aboutsummaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-09-30 09:30:58 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-10-03 22:55:42 +0200
commit8a00560de2804fa8ab639c6e895ed3a7f1e75efc (patch)
tree191b93799f7f84f94dc8744f49d8eda8476c2807 /lib/http2.c
parent02c6b984cb7a2e01f290544a53a24d30fc7ab32e (diff)
http2: move state-init from creation to pre-transfer
To make sure that the HTTP/2 state is initialized correctly for duplicated handles. It would otherwise easily generate "spurious" PRIORITY frames to get sent over HTTP/2 connections when duplicated easy handles were used. Reported-by: Daniel Silverstone Fixes #4303 Closes #4442
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/http2.c b/lib/http2.c
index d2f5da17a..b5b831b56 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -1537,6 +1537,7 @@ static int h2_session_send(struct Curl_easy *data,
H2BUGF(infof(data, "Queuing PRIORITY on stream %u (easy %p)\n",
stream->stream_id, data));
+ DEBUGASSERT(stream->stream_id != -1);
rv = nghttp2_submit_priority(h2, NGHTTP2_FLAG_NONE, stream->stream_id,
&pri_spec);
if(rv)