|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30613 proxy problem in Curl library
Submitted: 2004-10-29 17:15 UTC Modified: 2004-11-01 05:56 UTC
From: sergey_s_m at mail dot ru Assigned:
Status: Closed Package: cURL related
PHP Version: 5.0.1 OS: Suse9.0
Private report: No CVE-ID:
 [2004-10-29 17:15 UTC] sergey_s_m at mail dot ru
Infinite looping when I tried to get page through proxy  
using curl library and option "CURLOPT_FOLLOWLOCATION".  
Without this option all works OK. This bug I saw under 
curl-7.10.5, curl-7.11.2 curl-7.12.2 

Reproduce code:
            $addr = "";
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $addr);
            curl_setopt($ch, CURLOPT_PROXY, $proxy);
            curl_setopt($ch, CURLOPT_HEADER, 1);
            curl_setopt($ch, CURLOPT_HTTPGET,1);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt($ch, CURLOPT_HEADER, FALSE); 
	curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
            curl_setopt($ch, CURLOPT_TIMEOUT, 3);
           $parse = curl_exec($ch);

Expected result:
I've expected printing "OK" 

Actual result:
firstly I sow nothing. 
when I became use curl_setopt($ch, CURLOPT_VERBOSE, TRUE) 
I sow lopping next: 
* About to connect() to port 1080 
*   Trying * connected 
* Connected to ( port 1080 
> GET HTTP/1.1 
Pragma: no-cache 
Accept: */* 
< HTTP/1.0 302 Found 
< Connection: Close 
< Location: http://no-full-proxy-allowed/ 
* Closing connection #0 
* Issue another request to this URL: 'http://
* About to connect() to port 1080 
*   Trying * connected 
* Connected to ( port 1080 
> GET http://no-full-proxy-allowed/ HTTP/1.1 
Host: no-full-proxy-allowed 
Pragma: no-cache 
Accept: */* 
Notice: when I use $addr = ""; instead 
$addr = ""; All works OK! 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-01 05:56 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 20:01:32 2015 UTC