mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-22 11:36:21 +00:00
Fix #1558 - add opts.extra_headers in 304 responses
This commit is contained in:
1 parent
e2ce68e3ef
commit
65957527cb
3 files changed
+8
-2
No files matched your search
+2
-1
@@ -451,7 +451,8 @@ void mg_http_serve_file(struct mg_connection *c, struct mg_http_message *hm,
|
||||
(inm = mg_http_get_header(hm, "If-None-Match")) != NULL &&
|
||||
mg_vcasecmp(inm, etag) == 0) {
|
||||
mg_fs_close(fd);
|
||||
mg_printf(c, "HTTP/1.1 304 Not Modified\r\nContent-Length: 0\r\n\r\n");
|
||||
mg_printf(c, "HTTP/1.1 304 Not Modified\r\n%sContent-Length: 0\r\n\r\n",
|
||||
opts->extra_headers ? opts->extra_headers : "");
|
||||
} else {
|
||||
int n, status = 200;
|
||||
char range[100] = "";
|
||||
|
||||
Reference in new issue
Block a user