diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
commit | 02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch) | |
tree | f053238978479e408a2b83571443e132f30586ab /src/cmd/smugfs/http.c | |
parent | c0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff) | |
parent | 3d1382b98a502d0c34d5ba2c462396acc515016e (diff) | |
download | plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2 plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/smugfs/http.c')
-rw-r--r-- | src/cmd/smugfs/http.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/smugfs/http.c b/src/cmd/smugfs/http.c index 9cf7f1d0..c6c117fc 100644 --- a/src/cmd/smugfs/http.c +++ b/src/cmd/smugfs/http.c @@ -21,7 +21,7 @@ parseheader(char *buf, int n, HTTPHeader *hdr) { int nline; char *data, *ebuf, *p, *q, *next; - + memset(hdr, 0, sizeof *hdr); ebuf = buf+n; data = haveheader(buf, n); @@ -78,7 +78,7 @@ parseheader(char *buf, int n, HTTPHeader *hdr) q++; strncpy(hdr->codedesc, q, sizeof hdr->codedesc); hdr->codedesc[sizeof hdr->codedesc-1] = 0; - continue; + continue; } q = strchr(p, ':'); if(q == nil) @@ -103,7 +103,7 @@ parseheader(char *buf, int n, HTTPHeader *hdr) memmove(buf, data, ebuf - data); return ebuf - data; -} +} static char* genhttp(Protocol *proto, char *host, char *req, HTTPHeader *hdr, int wfd, int rfd, vlong rtotal) @@ -131,7 +131,7 @@ genhttp(Protocol *proto, char *host, char *req, HTTPHeader *hdr, int wfd, int rf proto->close(fd); return nil; } - + if(rfd >= 0){ while(rtotal > 0){ m = sizeof buf; |