[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 139/222: http2: move state-init from creation to pre-transfer
From: |
gnunet |
Subject: |
[gnurl] 139/222: http2: move state-init from creation to pre-transfer |
Date: |
Thu, 07 Nov 2019 00:10:35 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 8a00560de2804fa8ab639c6e895ed3a7f1e75efc
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Sep 30 09:30:58 2019 +0200
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
---
lib/http2.c | 1 +
lib/transfer.c | 1 +
lib/url.c | 2 --
3 files changed, 2 insertions(+), 2 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)
diff --git a/lib/transfer.c b/lib/transfer.c
index 421c8d2d0..d0d4aeb50 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1510,6 +1510,7 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
}
}
#endif
+ Curl_http2_init_state(&data->state);
}
return result;
diff --git a/lib/url.c b/lib/url.c
index 031f8f0c4..8538d24dd 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -619,8 +619,6 @@ CURLcode Curl_open(struct Curl_easy **curl)
data->progress.flags |= PGRS_HIDE;
data->state.current_speed = -1; /* init to negative == impossible */
-
- Curl_http2_init_state(&data->state);
}
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 149/222: TODO: Consult %APPDATA% also for .netrc, (continued)
- [gnurl] 149/222: TODO: Consult %APPDATA% also for .netrc, gnunet, 2019/11/06
- [gnurl] 146/222: ldap: fix OOM error on missing query string, gnunet, 2019/11/06
- [gnurl] 138/222: urlapi: fix use-after-free bug, gnunet, 2019/11/06
- [gnurl] 153/222: docs: make sure the --no-progress-meter docs file is in dist too, gnunet, 2019/11/06
- [gnurl] 154/222: cirrus: Increase the git clone depth., gnunet, 2019/11/06
- [gnurl] 152/222: docs: document it as --no-progress-meter instead of the reverse, gnunet, 2019/11/06
- [gnurl] 159/222: RELEASE-NOTES: synced, gnunet, 2019/11/06
- [gnurl] 157/222: cirrus: switch off blackhole status on the freebsd CI machines, gnunet, 2019/11/06
- [gnurl] 106/222: vtls: Fix comment typo about macosx-version-min compiler flag, gnunet, 2019/11/06
- [gnurl] 136/222: docs: add note on failed handles not being counted by curl_multi_perform, gnunet, 2019/11/06
- [gnurl] 139/222: http2: move state-init from creation to pre-transfer,
gnunet <=
- [gnurl] 144/222: RELEASE-NOTES: synced, gnunet, 2019/11/06
- [gnurl] 165/222: appveyor: add a winbuild that uses VS2017, gnunet, 2019/11/06
- [gnurl] 176/222: CURLOPT_TIMEOUT.3: Clarify transfer timeout time includes queue time, gnunet, 2019/11/06
- [gnurl] 173/222: tests: line ending fixes for Windows, gnunet, 2019/11/06
- [gnurl] 179/222: configure: remove all cyassl references, gnunet, 2019/11/06
- [gnurl] 183/222: http2_recv: a closed stream trumps pause state, gnunet, 2019/11/06
- [gnurl] 184/222: appveyor: Add MSVC ARM64 build, gnunet, 2019/11/06
- [gnurl] 194/222: appveyor: make winbuilds with DEBUG=no/yes and VS 2015/2017, gnunet, 2019/11/06
- [gnurl] 164/222: socketpair: fix include and define for older TCP header systems, gnunet, 2019/11/06
- [gnurl] 172/222: tests: use proxy feature, gnunet, 2019/11/06