diff options
author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-02-09 22:30:24 +0900 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-02-09 15:52:56 +0100 |
commit | 7eebf9a3fb7058ca95038450184ec44609a0daa7 (patch) | |
tree | e98a1d300140f24b2043e8fd6727dc2d30e413ce | |
parent | 20c727ec4c6c1af9b62158e913dd15a746b6076f (diff) |
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.
-rw-r--r-- | lib/http2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/http2.c b/lib/http2.c index dac9ab4a1..31949413b 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -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; } |