mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:33:37 +03:00
fixup make test 2011 run as well
This commit is contained in:
parent
17bd39484b
commit
d6464f991c
3 changed files with 24 additions and 4 deletions
|
|
@ -1289,6 +1289,13 @@ CURLcode Curl_http_follow(struct Curl_easy *data, const char *newurl,
|
|||
}
|
||||
}
|
||||
DEBUGASSERT(follow_url);
|
||||
{
|
||||
CURLcode result = Curl_reset_proxypwd(data);
|
||||
if(result) {
|
||||
curlx_free(follow_url);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
if(type == FOLLOW_FAKE) {
|
||||
/* we are only figuring out the new URL if we would have followed locations
|
||||
|
|
|
|||
|
|
@ -451,15 +451,25 @@ CURLcode Curl_reset_userpwd(struct Curl_easy *data)
|
|||
if(!result)
|
||||
result = Curl_setstropt(&data->state.aptr.passwd,
|
||||
data->set.str[STRING_PASSWORD]);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore the proxy credentials to those set in options.
|
||||
*/
|
||||
CURLcode Curl_reset_proxypwd(struct Curl_easy *data)
|
||||
{
|
||||
#ifndef CURL_DISABLE_PROXY
|
||||
if(!result)
|
||||
result = Curl_setstropt(&data->state.aptr.proxyuser,
|
||||
data->set.str[STRING_PROXYUSERNAME]);
|
||||
CURLcode result = Curl_setstropt(&data->state.aptr.proxyuser,
|
||||
data->set.str[STRING_PROXYUSERNAME]);
|
||||
if(!result)
|
||||
result = Curl_setstropt(&data->state.aptr.proxypasswd,
|
||||
data->set.str[STRING_PROXYPASSWORD]);
|
||||
#endif
|
||||
return result;
|
||||
#else
|
||||
(void)data;
|
||||
return CURLE_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -612,6 +622,8 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
|
|||
|
||||
if(!result)
|
||||
result = Curl_reset_userpwd(data);
|
||||
if(!result)
|
||||
result = Curl_reset_proxypwd(data);
|
||||
|
||||
data->req.headerbytecount = 0;
|
||||
Curl_headers_cleanup(data);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ char *Curl_checkheaders(const struct Curl_easy *data,
|
|||
void Curl_init_CONNECT(struct Curl_easy *data);
|
||||
|
||||
CURLcode Curl_reset_userpwd(struct Curl_easy *data);
|
||||
CURLcode Curl_reset_proxypwd(struct Curl_easy *data);
|
||||
CURLcode Curl_pretransfer(struct Curl_easy *data);
|
||||
|
||||
CURLcode Curl_sendrecv(struct Curl_easy *data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue