summaryrefslogtreecommitdiff
path: root/sys/src/cmd/webfs
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-06-24 21:52:17 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2018-06-24 21:52:17 +0200
commit8f1eb1ac77640d9cd189c49fe48af8cde65eceb1 (patch)
treedcd09a25a8522d5d1234719127629b91a07ca027 /sys/src/cmd/webfs
parent3b376b43af24f8013d330eb2eb9c3b78849bb7c3 (diff)
webfs: don't handle unknown status codes as continuations, reset status when handling continuation to avoid infinite loop
Diffstat (limited to 'sys/src/cmd/webfs')
-rw-r--r--sys/src/cmd/webfs/http.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/cmd/webfs/http.c b/sys/src/cmd/webfs/http.c
index b429112e4..668d474f3 100644
--- a/sys/src/cmd/webfs/http.c
+++ b/sys/src/cmd/webfs/http.c
@@ -795,12 +795,16 @@ http(char *m, Url *u, Key *shdr, Buq *qbody, Buq *qpost)
i -= (i % 100);
goto Status;
}
+ goto Error;
case 100: /* Continue */
case 101: /* Switching Protocols */
+ case 102: /* Processing */
+ case 103: /* Early Hints */
while(k = rhdr){
rhdr = k->next;
free(k);
}
+ strcpy(status, "0 No status");
goto Cont;
case 304: /* Not Modified */
nobody = 1;