The comment before the offending line indicated it was intended to only
erase the fields, but it erased the whole response. It was most likely a
bug.
---
 http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/http.c b/http.c
index f1e15a4..27d20f7 100644
--- a/http.c
+++ b/http.c
@@ -182,7 +182,7 @@ http_parse_header(const char *h, struct request *req)
        char *m, *n;
 
        /* empty all fields */
-       memset(req, 0, sizeof(*req));
+       memset(&(req->fields), 0, sizeof(req->fields));
 
        /*
         * parse request line
-- 
2.29.0


Reply via email to