From: Tatsuhiro Tsujikawa Date: Thu, 21 May 2015 16:21:59 +0000 (+0900) Subject: http2: Make HTTP Upgrade work X-Git-Tag: curl-7_43_0~92 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=640f283bbb4f503097232f2c85f0a80aa39dd044;p=thirdparty%2Fcurl.git http2: Make HTTP Upgrade work This commit just add implicitly opened stream 1 to streams hash. --- diff --git a/lib/http2.c b/lib/http2.c index 0e82a9f87d..9318242955 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -1268,6 +1268,13 @@ CURLcode Curl_http2_switched(struct connectdata *conn, nghttp2_strerror(rv), rv); return CURLE_HTTP2; } + + /* put the SessionHandle in the hash with the stream->stream_id as key */ + if(!Curl_hash_add(&httpc->streamsh, &stream->stream_id, + sizeof(stream->stream_id), conn->data)) { + failf(conn->data, "Couldn't add stream to hash!"); + return CURLE_OUT_OF_MEMORY; + } } else { /* stream ID is unknown at this point */