Commit 58da463a authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Make deflater bad state if parsing HEADERS/PUSH_PROMISE failed

parent 36c8de9d
......@@ -4582,6 +4582,16 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
break;
}
switch(iframe->frame.hd.type) {
case NGHTTP2_HEADERS:
case NGHTTP2_PUSH_PROMISE:
/* Mark inflater bad so that we won't perform further decoding */
session->hd_inflater.ctx.bad = 1;
break;
default:
break;
}
nghttp2_inbound_frame_reset(session);
break;
......@@ -4714,9 +4724,6 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
return rv;
}
/* Mark inflater bad so that we won't perform further decoding */
session->hd_inflater.ctx.bad = 1;
busy = 1;
iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
......
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