Commit 22e41bab authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpd: Issue RST_STREAM if received header field contains invalid chars

parent b0078a23
......@@ -1022,8 +1022,11 @@ int on_header_callback(nghttp2_session *session, const nghttp2_frame *frame,
if (!stream) {
return 0;
}
if (!http2::check_nv(name, namelen, value, valuelen)) {
return 0;
nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE, frame->hd.stream_id,
NGHTTP2_PROTOCOL_ERROR);
return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
}
auto token = http2::lookup_token(name, namelen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment