[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 41/205: http2: Fix assertion error on redirect with
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 41/205: http2: Fix assertion error on redirect with CL=0 |
Date: |
Thu, 20 Apr 2017 16:19:41 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.
commit 475c2583d506f9ee19375eb92c423dc492b1b2ed
Author: Tatsuhiro Tsujikawa <address@hidden>
AuthorDate: Fri Mar 3 21:44:01 2017 +0900
http2: Fix assertion error on redirect with CL=0
This fixes assertion error which occurs when redirect is done with 0
length body via HTTP/2, and the easy handle is reused, but new
connection is established due to hostname change:
curl: http2.c:1572: ssize_t http2_recv(struct connectdata *,
int, char *, size_t, CURLcode *):
Assertion `httpc->drain_total >= data->state.drain' failed.
To fix this bug, ensure that http2_handle_stream is called.
Fixes #1286
Closes #1302
---
lib/http.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/lib/http.c b/lib/http.c
index 8db86cd84..fbb0376a3 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -3240,9 +3240,17 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy
*data,
k->maxdownload = k->size;
}
- /* If max download size is *zero* (nothing) we already
- have nothing and can safely return ok now! */
- if(0 == k->maxdownload)
+ /* If max download size is *zero* (nothing) we already have
+ nothing and can safely return ok now! But for HTTP/2, we'd
+ like to call http2_handle_stream_close to properly close a
+ stream. In order to do this, we keep reading until we
+ close the stream. */
+ if(0 == k->maxdownload
+#if defined(USE_NGHTTP2)
+ && !((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
+ conn->httpversion == 20)
+#endif
+ )
*stop_reading = TRUE;
if(*stop_reading) {
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 196/205: extern-scan.pl: strip trailing CR, (continued)
- [GNUnet-SVN] [gnurl] 196/205: extern-scan.pl: strip trailing CR, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 174/205: vtls: fix unreferenced variable warnings, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 191/205: http2: fix handle leak in error path, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 24/205: fix some typos in the doc (#1306), gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 64/205: authneg: clear auth.multi flag at http_done, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 104/205: tests/README: mention nroff for --manual tests, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 73/205: tests: clear the SSL_CERT_FILE variable on --libcurl tests, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 55/205: mkhelp: simplified the gzip code, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 102/205: travis: run tests-nonflaky instead of tests-full, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 77/205: winbuild: add basic support for OpenSSL 1.1.x, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 41/205: http2: Fix assertion error on redirect with CL=0,
gnunet <=
- [GNUnet-SVN] [gnurl] 46/205: maketgz: Run updatemanpages.pl to update man pages, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 124/205: RELEASE-NOTES: synced with 556c51a2df, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 127/205: docs/Makefile.am: include CMakeLists.txt in the dist tarball, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 90/205: runtests.pl: fixed display of the Gopher IPv6 port number, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 125/205: curl: fix callback argument inconsistency, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 131/205: connect: fix unreferenced parameter warning, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 105/205: mkhelp: disable compression if the perl gzip module is unavailable, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 19/205: no-keepalive.d: fix typo, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 123/205: KNOWN_BUGS: typo, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 135/205: http2: silence unused parameter warnings, gnunet, 2017/04/20