[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 115/173: transfer: only retry nobody-requests for H
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 115/173: transfer: only retry nobody-requests for HTTP |
Date: |
Fri, 24 Feb 2017 14:02:17 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.53.1
in repository gnurl.
commit 6ffe0f5d9670367f128d75c4c68bc427fdc60a5d
Author: Markus Westerlind <address@hidden>
AuthorDate: Fri Feb 3 15:58:41 2017 +0100
transfer: only retry nobody-requests for HTTP
Using sftp to delete a file with CURLOPT_NOBODY set with a reused
connection would fail as curl expected to get some data. Thus it would
retry the command again which fails as the file has already been
deleted.
Fixes #1243
---
lib/transfer.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/lib/transfer.c b/lib/transfer.c
index 750fb04e2..a577bf724 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1843,12 +1843,17 @@ CURLcode Curl_retry_request(struct connectdata *conn,
return CURLE_OK;
if((data->req.bytecount + data->req.headerbytecount == 0) &&
- conn->bits.reuse &&
- (data->set.rtspreq != RTSPREQ_RECEIVE)) {
- /* We didn't get a single byte when we attempted to re-use a
- connection. This might happen if the connection was left alive when we
- were done using it before, but that was closed when we wanted to use it
- again. Bad luck. Retry the same request on a fresh connect! */
+ conn->bits.reuse &&
+ (!data->set.opt_no_body
+ || (conn->handler->protocol & PROTO_FAMILY_HTTP)) &&
+ (data->set.rtspreq != RTSPREQ_RECEIVE)) {
+ /* We got no data, we attempted to re-use a connection. For HTTP this
+ can be a retry so we try again regardless if we expected a body.
+ For other protocols we only try again only if we expected a body.
+
+ This might happen if the connection was left alive when we were
+ done using it before, but that was closed when we wanted to read from
+ it again. Bad luck. Retry the same request on a fresh connect! */
infof(conn->data, "Connection died, retrying a fresh connect\n");
*url = strdup(conn->data->change.url);
if(!*url)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 57/173: docs: Add note about libcurl copying strings to CURLOPT_* manpages, (continued)
- [GNUnet-SVN] [gnurl] 57/173: docs: Add note about libcurl copying strings to CURLOPT_* manpages, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 119/173: test1139: Added the --manual keyword since the manual is required, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 124/173: nss: make FTPS work with --proxytunnel, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 93/173: INTERNALS.md: language improvements, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 110/173: CHANGES: spell fix, use correct path to script, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 78/173: CURLOPT_CONNECT_TO: Fix compile warnings, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 88/173: vtls: source indentation fix, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 170/173: tests: use consistent environment variables for setting charset, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 153/173: TLS: make SSL_VERIFYSTATUS work again, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 160/173: TODO: HTTP Digest using SHA-256, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 115/173: transfer: only retry nobody-requests for HTTP,
gnunet <=
- [GNUnet-SVN] [gnurl] 114/173: telnet: Fix typos, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 130/173: http2: fix memory-leak when denying push streams, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 158/173: urldata: include curl_sspi.h when Windows SSPI is enabled, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 159/173: TODO: brotli is deployed widely now, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 167/173: TODO: "OPTIONS *", gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 134/173: RELEASE-NOTES: synced with 690935390c29c, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 21/173: digest_sspi: copy terminating NUL as well, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 118/173: RELEASE-NOTES: synced with 102454459dd688c, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 142/173: docs: fix timeout handling in multi-uv example, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 116/173: http2: reset push header counter fixes crash, gnunet, 2017/02/24