diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-06-24 21:52:17 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-06-24 21:52:17 +0200 |
commit | 8f1eb1ac77640d9cd189c49fe48af8cde65eceb1 (patch) | |
tree | dcd09a25a8522d5d1234719127629b91a07ca027 | |
parent | 3b376b43af24f8013d330eb2eb9c3b78849bb7c3 (diff) |
webfs: don't handle unknown status codes as continuations, reset status when handling continuation to avoid infinite loop
-rw-r--r-- | sys/src/cmd/webfs/http.c | 4 |
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; |