aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-02-09 22:30:24 +0900
committerDaniel Stenberg <daniel@haxx.se>2015-02-09 15:52:56 +0100
commit7eebf9a3fb7058ca95038450184ec44609a0daa7 (patch)
treee98a1d300140f24b2043e8fd6727dc2d30e413ce
parent20c727ec4c6c1af9b62158e913dd15a746b6076f (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.c5
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;
}