cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-3042747 ] Strange bug with curl/php/proxy

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 11 Aug 2010 07:25:34 +0000

Bugs item #3042747, was opened at 2010-08-11 00:45
Message generated for change (Comment added) 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: http
Group: bad behaviour
>Status: Open
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Oleg Golovanov (ogolovanov)
Assigned to: Daniel Stenberg (bagder)
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

----------------------------------------------------------------------

>Comment By: Oleg Golovanov (ogolovanov)
Date: 2010-08-11 11:25

Message:
Ok, i really hope that it will be fixed in 7.21.1 ..
P.s. at the moment of writing post i haven't known yet, that this tracker
not for bindings, sorry

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-08-11 01:03

Message:
This bug tracker is for libcurl, no binding for it. libcurl is plain C. I
would like to see your problem as a plain C source as otherwise I won't be
able to debug it and we will just risk that the bug is in fact in the
binding glue code and not in libcurl itself.

Also, before you post your C version here that repeats the problem, I
would suggest that you first A) try 7.21.0 and then even B) the latest
git/snapshot version as we fixed a SOCKS proxy problem with the multi
interface just a few days ago. Of course, 7.21.1 will be released very soon
and will contain that particular bugfix.

Thanks.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3042747&group_id=976
Received on 2010-08-11

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET