From 6700626c304d435c06c2aa8a65ef8ca09076ad9f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 3 Oct 2018 23:24:32 +0900 Subject: [PATCH] Rule out content-length in the successful response to CONNECT --- lib/nghttp2_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nghttp2_http.c b/lib/nghttp2_http.c index 0f1c5c5f..ba6ff35f 100644 --- a/lib/nghttp2_http.c +++ b/lib/nghttp2_http.c @@ -264,7 +264,7 @@ static int http_response_on_header(nghttp2_stream *stream, nghttp2_hd_nv *nv, return NGHTTP2_ERR_REMOVE_HTTP_HEADER; } if (stream->status_code / 100 == 1 || - (stream->status_code == 200 && + (stream->status_code / 100 == 2 && (stream->http_flags & NGHTTP2_HTTP_FLAG_METH_CONNECT))) { return NGHTTP2_ERR_HTTP_HEADER; }