mirror of https://github.com/nealey/eris.git
stop sending content-type for 304 responses
This commit is contained in:
parent
7b1cec44b4
commit
db71c8d9c0
7
CHANGES
7
CHANGES
|
@ -1,3 +1,10 @@
|
||||||
|
1.11:
|
||||||
|
Fix if-modified-since date parsing
|
||||||
|
Make text content-types use charset=UTF-8
|
||||||
|
Change default content-type to application/octet-stream
|
||||||
|
Makefile no longer overrides CC and CPP from parent makes
|
||||||
|
Don't send Content-type if there's no content
|
||||||
|
|
||||||
1.10:
|
1.10:
|
||||||
have fallback in case sendfile fails
|
have fallback in case sendfile fails
|
||||||
|
|
||||||
|
|
7
httpd.c
7
httpd.c
|
@ -252,8 +252,11 @@ static void badrequest(long code,const char *httpcomment,const char *message) {
|
||||||
buffer_putulong(buffer_1,code);
|
buffer_putulong(buffer_1,code);
|
||||||
buffer_putspace(buffer_1);
|
buffer_putspace(buffer_1);
|
||||||
buffer_puts(buffer_1,httpcomment);
|
buffer_puts(buffer_1,httpcomment);
|
||||||
buffer_puts(buffer_1,"\r\nContent-Type: text/html\r\nConnection: close\r\n\r\n");
|
buffer_puts(buffer_1, "\r\nConnection: close\r\n\r\n");
|
||||||
buffer_puts(buffer_1,message);
|
if (message[0]) {
|
||||||
|
buffer_puts(buffer_1,"\r\nContent-Type: text/html");
|
||||||
|
buffer_puts(buffer_1,message);
|
||||||
|
}
|
||||||
buffer_flush(buffer_1);
|
buffer_flush(buffer_1);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue