mirror of
https://github.com/simon987/sist2.git
synced 2025-04-16 08:56:45 +00:00
Add Accept-Range header
This commit is contained in:
parent
bb23651087
commit
648e4817c4
@ -251,7 +251,7 @@ void serve_file_from_disk(cJSON *json, index_t *idx, struct mg_connection *nc, s
|
|||||||
LOG_DEBUGF("serve.c", "Serving file from disk: %s", full_path)
|
LOG_DEBUGF("serve.c", "Serving file from disk: %s", full_path)
|
||||||
|
|
||||||
char disposition[8192];
|
char disposition[8192];
|
||||||
snprintf(disposition, sizeof(disposition), "Content-Disposition: inline; filename=\"%s%s%s\"\r\n",
|
snprintf(disposition, sizeof(disposition), "Content-Disposition: inline; filename=\"%s%s%s\"\r\nAccept-Ranges: bytes\r\n",
|
||||||
name, strlen(ext) == 0 ? "" : ".", ext);
|
name, strlen(ext) == 0 ? "" : ".", ext);
|
||||||
|
|
||||||
mg_http_serve_file(nc, hm, full_path, mime, disposition);
|
mg_http_serve_file(nc, hm, full_path, mime, disposition);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user