Don't forget to send the Content-length header after calculating it.
PR: 29725 Submitted by: Eugene Grosbein <eugen@svzserv.kemerovo.su>
This commit is contained in:
parent
cda5ba2ceb
commit
fa25e61082
@ -319,6 +319,7 @@ http_request(void)
|
||||
http_date();
|
||||
|
||||
sprintf(buff, "Content-length: %lld\r\n", file_status.st_size);
|
||||
write(con_sock, buff, strlen(buff));
|
||||
|
||||
if (strstr(filename,".txt")) {
|
||||
strcpy(buff,"Content-type: text/plain\r\n");
|
||||
|
Loading…
Reference in New Issue
Block a user