summaryrefslogtreecommitdiffstats
path: root/release/picobsd
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2003-04-05 17:15:38 +0000
committerdwmalone <dwmalone@FreeBSD.org>2003-04-05 17:15:38 +0000
commit8c4ce3ec4fdf72deeb9a71d1e7162f852ecaefed (patch)
treea581d0cbf18c64e55c721ccffe9c09993b65aa50 /release/picobsd
parent0b435ab28a5739d859215191d5170a950f567791 (diff)
downloadFreeBSD-src-8c4ce3ec4fdf72deeb9a71d1e7162f852ecaefed.zip
FreeBSD-src-8c4ce3ec4fdf72deeb9a71d1e7162f852ecaefed.tar.gz
Don't forget to send the Content-length header after calculating it.
PR: 29725 Submitted by: Eugene Grosbein <eugen@svzserv.kemerovo.su>
Diffstat (limited to 'release/picobsd')
-rw-r--r--release/picobsd/tinyware/simple_httpd/simple_httpd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/release/picobsd/tinyware/simple_httpd/simple_httpd.c b/release/picobsd/tinyware/simple_httpd/simple_httpd.c
index 9d186ff..6be3809 100644
--- a/release/picobsd/tinyware/simple_httpd/simple_httpd.c
+++ b/release/picobsd/tinyware/simple_httpd/simple_httpd.c
@@ -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");
OpenPOWER on IntegriCloud