nghttpx: Fix bug CONNECT does not work
This commit is contained in:
parent
b8a01f5212
commit
358d12a842
|
@ -252,7 +252,11 @@ void on_frame_recv_callback
|
|||
break;
|
||||
}
|
||||
}
|
||||
if((frame->hd.flags & NGHTTP2_FLAG_END_STREAM) == 0 &&
|
||||
if(!bad_req &&
|
||||
!util::strieq("CONNECT",
|
||||
nva[req_hdidx[1]].value,
|
||||
nva[req_hdidx[1]].valuelen) &&
|
||||
(frame->hd.flags & NGHTTP2_FLAG_END_STREAM) == 0 &&
|
||||
req_hdidx[4] == -1) {
|
||||
// If content-length is missing,
|
||||
// Downstream::push_upload_data_chunk will fail and
|
||||
|
|
|
@ -184,7 +184,8 @@ void on_ctrl_recv_callback
|
|||
return;
|
||||
}
|
||||
// Require content-length if FIN flag is not set.
|
||||
if((frame->syn_stream.hd.flags & SPDYLAY_CTRL_FLAG_FIN) == 0 &&
|
||||
if(!util::strieq("CONNECT", method) &&
|
||||
(frame->syn_stream.hd.flags & SPDYLAY_CTRL_FLAG_FIN) == 0 &&
|
||||
!content_length) {
|
||||
upstream->rst_stream(downstream, SPDYLAY_PROTOCOL_ERROR);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue