]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #30613 (Prevent infinite recursion in url redirection).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 1 Nov 2004 04:55:01 +0000 (04:55 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 1 Nov 2004 04:55:01 +0000 (04:55 +0000)
ext/curl/interface.c

index b11dd2b0759f1e40069f761ab7f2ba94e4003720..8d1bb3600bb07a07ac9a05f73aefe82ea1719f0e 100644 (file)
@@ -801,6 +801,7 @@ PHP_FUNCTION(curl_init)
        curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER,       (void *) ch);
        curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
        curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
+       curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */
 #if defined(ZTS)
        curl_easy_setopt(ch->cp, CURLOPT_NOSIGNAL, 1);
 #endif