From 6330a6078d170ecabfa3eee53c0b67d3579fda8c Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 1 Nov 2004 04:52:51 +0000 Subject: [PATCH] Fixed bug #30613 (Prevent infinite recursion in url redirection). --- ext/curl/interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 07fc634638..2e6d84cc26 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -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 -- 2.50.1