nghttpx: Submit RST_STREAM if HEADERS appears in the middle of a stream

This commit is contained in:
Tatsuhiro Tsujikawa 2014-11-28 00:23:46 +09:00
parent 2a68cc7076
commit 204ff787fa
1 changed files with 6 additions and 1 deletions

View File

@ -461,7 +461,12 @@ int on_frame_recv_callback(nghttp2_session *session, const nghttp2_frame *frame,
downstream->end_upload_data();
downstream->set_request_state(Downstream::MSG_COMPLETE);
} else {
return NGHTTP2_ERR_CALLBACK_FAILURE;
rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE,
frame->hd.stream_id,
NGHTTP2_PROTOCOL_ERROR);
if (rv != 0) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
}
break;