From: Tatsuhiro Tsujikawa Date: Mon, 9 Feb 2015 13:30:24 +0000 (+0900) Subject: http2: Fix bug that associated stream canceled on PUSH_PROMISE X-Git-Tag: curl-7_41_0~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7eebf9a3fb7058ca95038450184ec44609a0daa7;p=thirdparty%2Fcurl.git 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. --- diff --git a/lib/http2.c b/lib/http2.c index dac9ab4a10..31949413bb 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; }