summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-05-22 01:21:59 +0900
committerDaniel Stenberg <daniel@haxx.se>2015-05-22 09:31:19 +0200
commit640f283bbb4f503097232f2c85f0a80aa39dd044 (patch)
tree84883acd0b1757a5197bbc429d0b264ed599c4dc
parent995c6006fecf7633f9fc5eb4b72da4f282fc12bb (diff)
downloadgnurl-640f283bbb4f503097232f2c85f0a80aa39dd044.tar.gz
gnurl-640f283bbb4f503097232f2c85f0a80aa39dd044.tar.bz2
gnurl-640f283bbb4f503097232f2c85f0a80aa39dd044.zip
http2: Make HTTP Upgrade work
This commit just add implicitly opened stream 1 to streams hash.
-rw-r--r--lib/http2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 0e82a9f87..931824295 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 */