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;
|
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) {
|
req_hdidx[4] == -1) {
|
||||||
// If content-length is missing,
|
// If content-length is missing,
|
||||||
// Downstream::push_upload_data_chunk will fail and
|
// Downstream::push_upload_data_chunk will fail and
|
||||||
|
|
|
@ -184,7 +184,8 @@ void on_ctrl_recv_callback
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Require content-length if FIN flag is not set.
|
// 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) {
|
!content_length) {
|
||||||
upstream->rst_stream(downstream, SPDYLAY_PROTOCOL_ERROR);
|
upstream->rst_stream(downstream, SPDYLAY_PROTOCOL_ERROR);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue