Rule out content-length in the successful response to CONNECT

This commit is contained in:
Tatsuhiro Tsujikawa 2018-10-03 23:24:32 +09:00
parent 15162addc4
commit 6700626c30

View File

@ -264,7 +264,7 @@ static int http_response_on_header(nghttp2_stream *stream, nghttp2_hd_nv *nv,
return NGHTTP2_ERR_REMOVE_HTTP_HEADER; return NGHTTP2_ERR_REMOVE_HTTP_HEADER;
} }
if (stream->status_code / 100 == 1 || if (stream->status_code / 100 == 1 ||
(stream->status_code == 200 && (stream->status_code / 100 == 2 &&
(stream->http_flags & NGHTTP2_HTTP_FLAG_METH_CONNECT))) { (stream->http_flags & NGHTTP2_HTTP_FLAG_METH_CONNECT))) {
return NGHTTP2_ERR_HTTP_HEADER; return NGHTTP2_ERR_HTTP_HEADER;
} }