http: do not assume body for CONNECT

(cherry picked from commit 998e68340e5cd289a16f340cc5c625e984e1f762)
This commit is contained in:
Azat Khuzhin 2020-01-12 13:43:18 +03:00
parent 3f1fb1f9ab
commit 1b42270b7a

1
http.c
View File

@ -358,6 +358,7 @@ evhttp_response_needs_body(struct evhttp_request *req)
return (req->response_code != HTTP_NOCONTENT &&
req->response_code != HTTP_NOTMODIFIED &&
(req->response_code < 100 || req->response_code >= 200) &&
req->type != EVHTTP_REQ_CONNECT &&
req->type != EVHTTP_REQ_HEAD);
}