Loading lib/highlevel.c +8 −2 Original line number Diff line number Diff line Loading @@ -629,6 +629,12 @@ CURLcode curl_transfer(CURL *curl) */ 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; Loading lib/url.c +3 −0 Original line number Diff line number Diff line Loading @@ -478,6 +478,9 @@ CURLcode curl_setopt(CURL *curl, CURLoption option, ...) case CURLOPT_TIMEOUT: data->timeout = va_arg(param, long); break; case CURLOPT_MAXREDIRS: data->maxredirs = va_arg(param, long); break; case CURLOPT_USERAGENT: data->useragent = va_arg(param, char *); break; Loading lib/urldata.h +1 −0 Original line number Diff line number Diff line Loading @@ -417,6 +417,7 @@ struct UrlData { /* stuff related to HTTP */ long followlocation; long maxredirs; /* maximum no. of http(s) redirects to follow */ char *referer; bool free_referer; /* set TRUE if 'referer' points to a string we allocated */ Loading Loading
lib/highlevel.c +8 −2 Original line number Diff line number Diff line Loading @@ -629,6 +629,12 @@ CURLcode curl_transfer(CURL *curl) */ 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; Loading
lib/url.c +3 −0 Original line number Diff line number Diff line Loading @@ -478,6 +478,9 @@ CURLcode curl_setopt(CURL *curl, CURLoption option, ...) case CURLOPT_TIMEOUT: data->timeout = va_arg(param, long); break; case CURLOPT_MAXREDIRS: data->maxredirs = va_arg(param, long); break; case CURLOPT_USERAGENT: data->useragent = va_arg(param, char *); break; Loading
lib/urldata.h +1 −0 Original line number Diff line number Diff line Loading @@ -417,6 +417,7 @@ struct UrlData { /* stuff related to HTTP */ long followlocation; long maxredirs; /* maximum no. of http(s) redirects to follow */ char *referer; bool free_referer; /* set TRUE if 'referer' points to a string we allocated */ Loading