aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 300b8e9f6..28e3fe476 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -675,10 +675,9 @@ CURLcode Curl_readwrite(struct connectdata *conn,
* depending on how authentication is working. Other codes
* are definitely errors, so give up here.
*/
- if (data->set.http_fail_on_error &&
- (k->httpcode >= 400) &&
- (k->httpcode != 401) &&
- (k->httpcode != 407)) {
+ if (data->set.http_fail_on_error && (k->httpcode >= 400) &&
+ ((k->httpcode != 401) || !data->set.userpwd) &&
+ ((k->httpcode != 407) || !data->set.proxyuserpwd) ) {
if (data->reqdata.resume_from &&
(data->set.httpreq==HTTPREQ_GET) &&