From dd8a19f8a05b59394d1ab33c09497e8db884742a Mon Sep 17 00:00:00 2001 From: Marc Schlatter Date: Mon, 11 Mar 2019 17:15:34 +0100 Subject: http: send payload when (proxy) authentication is done The check that prevents payload from sending in case of authentication doesn't check properly if the authentication is done or not. They're cases where the proxy respond "200 OK" before sending authentication challenge. This change takes care of that. Fixes #2431 Closes #3669 --- lib/http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/http.c b/lib/http.c index 3618f8728..3f41a451b 100644 --- a/lib/http.c +++ b/lib/http.c @@ -2060,7 +2060,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) return result; } - if((data->state.authhost.multipass || data->state.authproxy.multipass) && + if(((data->state.authhost.multipass && !data->state.authhost.done) + || (data->state.authproxy.multipass && !data->state.authproxy.done)) && (httpreq != HTTPREQ_GET) && (httpreq != HTTPREQ_HEAD)) { /* Auth is required and we are not authenticated yet. Make a PUT or POST -- cgit v1.2.3