Bugs item #3042747, was opened at 2010-08-11 00:45
Message generated for change (Tracker Item Submitted) made by ogolovanov
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3042747&group_id=976
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Oleg Golovanov (ogolovanov)
Assigned to: Nobody/Anonymous (nobody)
Summary: Strange bug with curl/php/proxy
Initial Comment:
Problem has appeared on 2 systems:
1) Linux 2.6.31-14-generic #48-Ubuntu i686 GNU/Linux,
PHP 5.3.1 with Xcache
curl 7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
2) FreeBSD 7.2-RELEASE amd64
PHP 5.3.1 with Xcache
curl 7.20.0 (x86_64-unknown-freebsd7.2) libcurl/7.20.0 OpenSSL/0.9.8e zlib/1.2.3
Description:
Curl handle, after success request to http proxy, gets absolutely the same response with next request through non-working socks proxy ( non-multi way )
Curl handle, that inserted to empty multi handle, successed with request through http proxy, removed and closed, and then next added curl handle through socks proxy will return exactly the same response
Example:
non-multi way:
<?php
ini_set('display_errors', true);
error_reporting(E_ALL | E_STRICT);
setlocale(LC_ALL, 'ru_RU.UTF-8');
function getHandle()
{
$ch = curl_init('http://www.yandex.ru/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_VERBOSE, false);
return $ch;
}
$ch = getHandle();
curl_setopt($ch, CURLOPT_PROXY, '95.215.233.3:8080'); // <-- working proxy at the moment of writing
$response1 = curl_exec($ch);
curl_setopt($ch, CURLOPT_PROXY, '111.111.111.111:1111');
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
$response2 = curl_exec($ch); // expected errno #28, but response successed as new proxy data was simply ignored
multi-way, which is more frustrating, cause the same behaviour appear on DIFFERENT handles.
The code is attached.
What can you say about this ?
// Oleg Golovanov
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3042747&group_id=976
Received on 2010-08-10