aboutsummaryrefslogtreecommitdiff
path: root/release/picobsd/tinyware/simple_httpd
diff options
context:
space:
mode:
authorDavid Malone <dwmalone@FreeBSD.org>2003-04-05 17:15:38 +0000
committerDavid Malone <dwmalone@FreeBSD.org>2003-04-05 17:15:38 +0000
commitfa25e610829cfcb7158ba88f663d3e12d0a50a63 (patch)
treea581d0cbf18c64e55c721ccffe9c09993b65aa50 /release/picobsd/tinyware/simple_httpd
parentcda5ba2cebb33d826113e3c17a97e90bb8262685 (diff)
downloadsrc-fa25e610829cfcb7158ba88f663d3e12d0a50a63.tar.gz
src-fa25e610829cfcb7158ba88f663d3e12d0a50a63.zip
Don't forget to send the Content-length header after calculating it.
PR: 29725 Submitted by: Eugene Grosbein <eugen@svzserv.kemerovo.su>
Notes
Notes: svn path=/head/; revision=113129
Diffstat (limited to 'release/picobsd/tinyware/simple_httpd')
-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 9d186ff43f7c..6be3809c3edf 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");