mirror of https://github.com/moparisthebest/curl
http2: Ignore if we have stream ID not in hash in on_stream_close
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.
This commit is contained in:
parent
4ac6cc3ebd
commit
7ff7e45405
10
lib/http2.c
10
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,
|
data_s = Curl_hash_pick(&conn->proto.httpc.streamsh, &stream_id,
|
||||||
sizeof(stream_id));
|
sizeof(stream_id));
|
||||||
if(!data_s) {
|
if(!data_s) {
|
||||||
/* Receiving a Stream ID not in the hash should not happen, this is an
|
/* We could get stream ID not in the hash. For example, if we
|
||||||
internal error more than anything else! */
|
decided to reject stream (e.g., PUSH_PROMISE). We call infof
|
||||||
failf(conn->data, "Received frame on Stream ID: %x not in stream hash!",
|
as a debugging purpose for now. */
|
||||||
|
infof(conn->data,
|
||||||
|
"Received frame on Stream ID: %x not in stream hash!\n",
|
||||||
stream_id);
|
stream_id);
|
||||||
return NGHTTP2_ERR_CALLBACK_FAILURE;
|
return 0;
|
||||||
}
|
}
|
||||||
stream = data_s->req.protop;
|
stream = data_s->req.protop;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue