mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-02-16 18:31:50 +01:00
Merge branch 'bugfix/KASM-2482_large_downloads' into 'master'
Use 64-bit var for the served file size Closes KASM-2482 See merge request kasm-technologies/internal/KasmVNC!40
This commit is contained in:
commit
d829572a9c
@ -871,14 +871,14 @@ static void servefile(ws_ctx_t *ws_ctx, const char *in) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fseek(f, 0, SEEK_END);
|
fseek(f, 0, SEEK_END);
|
||||||
const unsigned filesize = ftell(f);
|
const uint64_t filesize = ftell(f);
|
||||||
rewind(f);
|
rewind(f);
|
||||||
|
|
||||||
sprintf(buf, "HTTP/1.1 200 OK\r\n"
|
sprintf(buf, "HTTP/1.1 200 OK\r\n"
|
||||||
"Server: KasmVNC/4.0\r\n"
|
"Server: KasmVNC/4.0\r\n"
|
||||||
"Connection: close\r\n"
|
"Connection: close\r\n"
|
||||||
"Content-type: %s\r\n"
|
"Content-type: %s\r\n"
|
||||||
"Content-length: %u\r\n"
|
"Content-length: %lu\r\n"
|
||||||
"\r\n",
|
"\r\n",
|
||||||
name2mime(path), filesize);
|
name2mime(path), filesize);
|
||||||
ws_send(ws_ctx, buf, strlen(buf));
|
ws_send(ws_ctx, buf, strlen(buf));
|
||||||
|
Loading…
Reference in New Issue
Block a user