James Griffiths' max-redirs fix
This commit is contained in:
@@ -624,11 +624,17 @@ CURLcode curl_transfer(CURL *curl)
|
||||
|
||||
if((res == CURLE_OK) && data->newurl) {
|
||||
/* Location: redirect
|
||||
|
||||
|
||||
This is assumed to happen for HTTP(S) only!
|
||||
*/
|
||||
*/
|
||||
char prot[16];
|
||||
char path[URL_MAX_LENGTH];
|
||||
if (data->maxredirs && (data->followlocation >= data->maxredirs)) {
|
||||
failf(data,"Maximum (%d) redirects followed", data->maxredirs);
|
||||
curl_disconnect(c_connect);
|
||||
res=CURLE_TOO_MANY_REDIRECTS;
|
||||
break;
|
||||
}
|
||||
|
||||
/* mark the next request as a followed location: */
|
||||
data->bits.this_is_a_follow = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user