Commit 15c333fe authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Marko Mikulicic

Increase buffer size for the range header

This should cover 2^64-2^64/2^64

H/T @julee

PUBLISHED_FROM=bcc9f0193ab52375ece00a34c5758ddfe3b628c6
parent 31c20ab3
...@@ -5714,7 +5714,7 @@ static void mg_http_send_file2(struct mg_connection *nc, const char *path, ...@@ -5714,7 +5714,7 @@ static void mg_http_send_file2(struct mg_connection *nc, const char *path,
path) > 0) { path) > 0) {
mg_handle_ssi_request(nc, path, opts); mg_handle_ssi_request(nc, path, opts);
} else { } else {
char etag[50], current_time[50], last_modified[50], range[50]; char etag[50], current_time[50], last_modified[50], range[70];
time_t t = time(NULL); time_t t = time(NULL);
int64_t r1 = 0, r2 = 0, cl = st->st_size; int64_t r1 = 0, r2 = 0, cl = st->st_size;
struct mg_str *range_hdr = mg_get_http_header(hm, "Range"); struct mg_str *range_hdr = mg_get_http_header(hm, "Range");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment