http: do not assume body for CONNECT

This commit is contained in:
Azat Khuzhin 2020-01-12 13:43:18 +03:00
parent f0e79bafd8
commit 998e68340e

1
http.c
View File

@ -417,6 +417,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);
}