diff options
author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-05-16 18:13:10 +0900 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-05-18 08:31:15 +0200 |
commit | e6b42b8b6a8db7f874d4f2a179d5964db1834c14 (patch) | |
tree | b26c31d325b54e26ca439d992b77700ed1659237 | |
parent | 37938434ee61ceac54e5452b79905f85eff38619 (diff) | |
download | curl-http2-multiplex.tar.gz |
http2: Ignore if we have stream ID not in hash in on_stream_closehttp2-multiplex
We could get stream ID not in the hash in on_stream_close. For
example, if we decided to reject stream (e.g., PUSH_PROMISE), then we
don't create stream and store it in hash with its stream ID.
-rw-r--r-- | lib/http2.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/http2.c b/lib/http2.c index 951a0a884..d50f1731e 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -431,11 +431,13 @@ static int on_stream_close(nghttp2_session *session, int32_t stream_id, data_s = Curl_hash_pick(&conn->proto.httpc.streamsh, &stream_id, sizeof(stream_id)); if(!data_s) { - /* Receiving a Stream ID not in the hash should not happen, this is an - internal error more than anything else! */ - failf(conn->data, "Received frame on Stream ID: %x not in stream hash!", + /* We could get stream ID not in the hash. For example, if we + decided to reject stream (e.g., PUSH_PROMISE). We call infof + as a debugging purpose for now. */ + infof(conn->data, + "Received frame on Stream ID: %x not in stream hash!\n", stream_id); - return NGHTTP2_ERR_CALLBACK_FAILURE; + return 0; } stream = data_s->req.protop; |