mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
fixed bug report #462600, following a Location: when the initial URL didn't
have a protocol:// part did wrong
This commit is contained in:
parent
a17a78c477
commit
b556d6caee
10
lib/url.c
10
lib/url.c
@ -1704,12 +1704,12 @@ static CURLcode Connect(struct SessionHandle *data,
|
|||||||
} /* if not using proxy */
|
} /* if not using proxy */
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
* No protocol but proxy usage needs attention
|
* No protocol part in URL was used, add it!
|
||||||
*************************************************************/
|
*************************************************************/
|
||||||
if((conn->protocol&PROT_MISSING) && data->change.proxy ) {
|
if(conn->protocol&PROT_MISSING) {
|
||||||
/* We're guessing prefixes here and since we're told to use a proxy, we
|
/* We're guessing prefixes here and if we're told to use a proxy or if
|
||||||
need to add the protocol prefix to the URL string before we continue!
|
we're gonna follow a Location: later or... then we need the protocol
|
||||||
*/
|
part added so that we have a valid URL. */
|
||||||
char *reurl;
|
char *reurl;
|
||||||
|
|
||||||
reurl = aprintf("%s://%s", conn->protostr, data->change.url);
|
reurl = aprintf("%s://%s", conn->protostr, data->change.url);
|
||||||
|
Loading…
Reference in New Issue
Block a user