http2: Fix bug that associated stream canceled on PUSH_PROMISE

Previously we don't ignore PUSH_PROMISE header fields in on_header
callback.  It makes header values mixed with following HEADERS,
resulting protocol error.
This commit is contained in:
Tatsuhiro Tsujikawa 2015-02-09 22:30:24 +09:00 committed by Daniel Stenberg
parent 20c727ec4c
commit 7eebf9a3fb
1 changed files with 5 additions and 0 deletions

View File

@ -424,6 +424,11 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
(void)frame;
(void)flags;
/* Ignore PUSH_PROMISE for now */
if(frame->hd.type != NGHTTP2_HEADERS) {
return 0;
}
if(frame->hd.stream_id != c->stream_id) {
return 0;
}