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

index 07fc6346385f6decad70b1b42ab461180b7f9157..2e6d84cc267557d3b4380f6ea6b0ecc18be422b5 100644 (file)
@@ -802,6 +802,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