From 8f1eb1ac77640d9cd189c49fe48af8cde65eceb1 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 24 Jun 2018 21:52:17 +0200 Subject: [PATCH] webfs: don't handle unknown status codes as continuations, reset status when handling continuation to avoid infinite loop --- sys/src/cmd/webfs/http.c | 4 ++++ 1 file changed, 4 insertions(+) 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;