stop sending content-type for 304 responses

This commit is contained in:
Neale Pickett 2011-08-17 13:58:22 -06:00
parent 7b1cec44b4
commit db71c8d9c0
2 changed files with 12 additions and 2 deletions

View File

@ -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:
have fallback in case sendfile fails

View File

@ -252,8 +252,11 @@ static void badrequest(long code,const char *httpcomment,const char *message) {
buffer_putulong(buffer_1,code);
buffer_putspace(buffer_1);
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");
if (message[0]) {
buffer_puts(buffer_1,"\r\nContent-Type: text/html");
buffer_puts(buffer_1,message);
}
buffer_flush(buffer_1);
exit(0);
}