mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
James Atwill correctly pointed out that curl didn't follow Location: headers
properly when the new URL is an absolute one to a different port than the first URL...
This commit is contained in:
parent
e67157b5a2
commit
0059911261
10
lib/url.c
10
lib/url.c
@ -531,7 +531,11 @@ UrgError curl_urlget(UrgTag tag, ...)
|
|||||||
free(data->newurl);
|
free(data->newurl);
|
||||||
data->newurl = newest;
|
data->newurl = newest;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/* This was an absolute URL, clear the port number! */
|
||||||
|
data->port = 0;
|
||||||
|
}
|
||||||
|
|
||||||
data->url = data->newurl;
|
data->url = data->newurl;
|
||||||
data->newurl = NULL; /* don't show! */
|
data->newurl = NULL; /* don't show! */
|
||||||
|
|
||||||
@ -1175,6 +1179,10 @@ static UrgError _urlget(struct UrlData *data)
|
|||||||
infof(data, "Connected to %s (%s)\n", hp->h_name, inet_ntoa(in));
|
infof(data, "Connected to %s (%s)\n", hp->h_name, inet_ntoa(in));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* Kerberos experiements! Beware! Take cover! */
|
||||||
|
kerberos_connect(data, name);
|
||||||
|
#endif
|
||||||
|
|
||||||
if((data->conf&(CONF_FTP|CONF_PROXY)) == CONF_FTP) {
|
if((data->conf&(CONF_FTP|CONF_PROXY)) == CONF_FTP) {
|
||||||
result = ftp(data, &bytecount, data->user, data->passwd, ppath);
|
result = ftp(data, &bytecount, data->user, data->passwd, ppath);
|
||||||
if(result)
|
if(result)
|
||||||
|
Loading…
Reference in New Issue
Block a user