- disabling port on absolute redirects is wrong

- removed #ifdefed code
This commit is contained in:
Daniel Stenberg 2001-04-03 13:18:41 +00:00
parent 66a1e3df69
commit fa491ed910

View File

@ -777,9 +777,6 @@ CURLcode Curl_perform(CURL *curl)
if (data->maxredirs && (data->followlocation >= data->maxredirs)) { if (data->maxredirs && (data->followlocation >= data->maxredirs)) {
failf(data,"Maximum (%d) redirects followed", data->maxredirs); failf(data,"Maximum (%d) redirects followed", data->maxredirs);
#ifdef USE_OLD_DISCONNECT
curl_disconnect(c_connect);
#endif
res=CURLE_TOO_MANY_REDIRECTS; res=CURLE_TOO_MANY_REDIRECTS;
break; break;
} }
@ -828,13 +825,8 @@ CURLcode Curl_perform(CURL *curl)
protsep=strstr(url_clone, "//"); protsep=strstr(url_clone, "//");
if(!protsep) if(!protsep)
protsep=url_clone; protsep=url_clone;
else { else
port=FALSE; /* we got a full URL and thus we should not obey the
port number that might have been set by the user
in data->use_port */
protsep+=2; /* pass the slashes */ protsep+=2; /* pass the slashes */
}
if('/' != conn->newurl[0]) { if('/' != conn->newurl[0]) {
/* First we need to find out if there's a ?-letter in the URL, /* First we need to find out if there's a ?-letter in the URL,
@ -941,15 +933,8 @@ CURLcode Curl_perform(CURL *curl)
*/ */
break; break;
} }
#ifdef USE_OLD_DISCONNECT
curl_disconnect(c_connect);
#endif
continue; continue;
} }
#ifdef USE_OLD_DISCONNECT
curl_disconnect(c_connect);
#endif
} }
break; /* it only reaches here when this shouldn't loop */ break; /* it only reaches here when this shouldn't loop */