]> granicus.if.org Git - libevent/commitdiff
http: do not close connection for CONNECT
authorAzat Khuzhin <azat@libevent.org>
Sun, 12 Jan 2020 12:29:48 +0000 (15:29 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sun, 12 Jan 2020 12:34:01 +0000 (15:34 +0300)
http.c

diff --git a/http.c b/http.c
index 2f0bdd21818e6cc9e34a04b87026ddcbe9501700..d2ba8130dfd14dc01ec842957186d6a625e6e984 100644 (file)
--- a/http.c
+++ b/http.c
@@ -542,6 +542,9 @@ evhttp_is_connection_close(int flags, struct evkeyvalq* headers)
 static int
 evhttp_is_request_connection_close(struct evhttp_request *req)
 {
+       if (req->type == EVHTTP_REQ_CONNECT)
+               return 0;
+
        return
                evhttp_is_connection_close(req->flags, req->input_headers) ||
                evhttp_is_connection_close(req->flags, req->output_headers);