Commit 7eebf9a3 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa Committed by Daniel Stenberg
Browse files

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.
parent 20c727ec
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;
  }