summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ip/httpd/sendfd.c
diff options
context:
space:
mode:
authormischief <mischief@offblast.org>2015-08-25 02:07:46 -0700
committermischief <mischief@offblast.org>2015-08-25 02:07:46 -0700
commit6b402b83cffc97015345dab1c27c35afe64bb3db (patch)
treeb525f9443564682c46f8c36af6a4d238bd39a756 /sys/src/cmd/ip/httpd/sendfd.c
parentdbe0a995f03f26ea2b6859d21df3bd67856d672d (diff)
import E script from bell labs
Diffstat (limited to 'sys/src/cmd/ip/httpd/sendfd.c')
-rw-r--r--sys/src/cmd/ip/httpd/sendfd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/src/cmd/ip/httpd/sendfd.c b/sys/src/cmd/ip/httpd/sendfd.c
index b3ef1c13b..c1850ea75 100644
--- a/sys/src/cmd/ip/httpd/sendfd.c
+++ b/sys/src/cmd/ip/httpd/sendfd.c
@@ -240,10 +240,10 @@ static void
printtype(Hio *hout, HContent *type, HContent *enc)
{
hprint(hout, "Content-Type: %s/%s", type->generic, type->specific);
-/*
+
if(cistrcmp(type->generic, "text") == 0)
hprint(hout, ";charset=utf-8");
-*/
+
hprint(hout, "\r\n");
if(enc != nil)
hprint(hout, "Content-Encoding: %s\r\n", enc->generic);
@@ -351,6 +351,8 @@ checkreq(HConnect *c, HContent *type, HContent *enc, long mtime, char *etag)
if(c->req.vermaj >= 1 && c->req.vermin >= 1 && !hcheckcontent(enc, c->head.okencode, "Content-Encoding", 0))
return notaccept(c, type, enc, "Content-Encoding");
+ return 1;
+
/*
* can use weak match only with get or head;
* this always uses strong matches