Skip to content

Commit

Permalink
http2: Fix bug that associated stream canceled on PUSH_PROMISE
Browse files Browse the repository at this point in the history
Previously we don't ignore PUSH_PROMISE header fields in on_header
callback.  It makes header values mixed with following HEADERS,
resulting protocol error.
  • Loading branch information
tatsuhiro-t authored and bagder committed Feb 9, 2015
1 parent 20c727e commit 7eebf9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/http2.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7eebf9a

Please sign in to comment.