[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 59/178: tool_operate: Fix retry on FTP 4xx to ignor
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 59/178: tool_operate: Fix retry on FTP 4xx to ignore other protocols |
Date: |
Wed, 23 May 2018 12:24:54 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 464a019cbe028f1e0a85a6bd4631e41411b0d32d
Author: Stefan Agner <address@hidden>
AuthorDate: Fri Apr 6 21:00:02 2018 +0200
tool_operate: Fix retry on FTP 4xx to ignore other protocols
Only treat response code as FTP response codes in case the
protocol type is FTP.
This fixes an issue where an HTTP download was treated as FTP
in case libcurl returned with 33. This happens when the
download has already finished and the server responses 416:
HTTP/1.1 416 Requested Range Not Satisfiable
This should not be treated as an FTP error.
Fixes #2464
Closes #2465
---
src/tool_operate.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 0aad54282..8eac65d6a 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1570,9 +1570,13 @@ static CURLcode operate_do(struct GlobalConfig *global,
}
} /* if CURLE_OK */
else if(result) {
+ long protocol;
+
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
+ curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol);
- if(response/100 == 4)
+ if((protocol == CURLPROTO_FTP || protocol == CURLPROTO_FTPS) &&
+ response / 100 == 4)
/*
* This is typically when the FTP server only allows a certain
* amount of users and we are not one of them. All 4xx codes
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 43/178: test1148: set a fixed locale for the test, (continued)
- [GNUnet-SVN] [gnurl] 43/178: test1148: set a fixed locale for the test, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 41/178: cmake: Add advapi32 as explicit link library for win32, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 49/178: cookie: case-insensitive hashing for the domains, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 47/178: openssl: provide defines for argument typecasts to build warning-free, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 60/178: configure: detect sa_family_t, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 45/178: cookie: store cookies per top-level-domain-specific hash table, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 58/178: hash: calculate sizes with size_t instead of longs, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 53/178: FTP: allow PASV on IPv6 connections when a proxy is being used, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 42/178: docs: fix CURLINFO_*_T examples use of CURL_FORMAT_CURL_OFF_T, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 62/178: curl_setup: provide a CURL_SA_FAMILY_T type if none exists, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 59/178: tool_operate: Fix retry on FTP 4xx to ignore other protocols,
gnunet <=
- [GNUnet-SVN] [gnurl] 61/178: build: add picky compiler warning flags for gcc 6 and 7, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 46/178: openssl: fix build with LibreSSL 2.7, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 57/178: RELEASE-NOTES: synced, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 54/178: build-openssl.bat: allow custom paths for VS and perl, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 50/178: tls: fix mbedTLS 2.7.0 build + handle sha256 failures, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 52/178: file: restore old behavior for file:////foo/bar URLs, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 69/178: travis: use trusty for coverage build, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 70/178: travis: bump to clang 6 and gcc 7, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 85/178: README.md: add backers and sponsors, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 55/178: winbuild: make the clean target work without build-type, gnunet, 2018/05/23