aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/http.h3
-rw-r--r--lib/http2.c5
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/http.h b/lib/http.h
index fb924c609..1fa85f76b 100644
--- a/lib/http.h
+++ b/lib/http.h
@@ -191,6 +191,9 @@ struct http_conn {
size_t upload_len; /* size of the buffer 'upload_mem' points to */
size_t upload_left; /* number of bytes left to upload */
int status_code; /* HTTP status code */
+
+ /* this is a hash of all individual streams (SessionHandle structs) */
+ struct curl_hash streamsh;
#else
int unused; /* prevent a compiler warning */
#endif
diff --git a/lib/http2.c b/lib/http2.c
index 7a2f03207..9e9d86a9b 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -623,6 +623,11 @@ CURLcode Curl_http2_init(struct connectdata *conn)
failf(conn->data, "Couldn't initialize nghttp2!");
return CURLE_OUT_OF_MEMORY; /* most likely at least */
}
+
+ rc = Curl_hash_init(&conn->proto.httpc.streamsh, 7, Curl_hash_str,
+ Curl_str_key_compare, NULL);
+ if(rc)
+ return CURLE_OUT_OF_MEMORY; /* most likely at least */
}
return CURLE_OK;
}