mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-13 10:15:00 +00:00
Fix bugs about range request and explorer crashes
1. fix a bug that when header contains "Range: 100-", the range request support will fail 2. (windows) fix a bug that when explorer.exe crashes due to some reason, the tray icon will disappear.
This commit is contained in:
1 parent
7931929a42
commit
690eff4fa2
2 files changed
+6
-1
No files matched your search
+1
-1
@@ -2786,7 +2786,7 @@ static void handle_file_request(struct mg_connection *conn, const char *path,
|
||||
r1 = r2 = 0;
|
||||
hdr = mg_get_header(conn, "Range");
|
||||
if (hdr != NULL && (n = parse_range_header(hdr, &r1, &r2)) > 0 &&
|
||||
r1 >= 0 && r2 > 0) {
|
||||
r1 >= 0 && r2 >= 0) {
|
||||
conn->status_code = 206;
|
||||
cl = n == 2 ? (r2 > cl ? cl : r2) - r1 + 1: cl - r1;
|
||||
mg_snprintf(conn, range, sizeof(range),
|
||||
|
||||
Reference in new issue
Block a user