php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71831 CURLOPT_NOPROXY applied as long instead of string
Submitted: 2016-03-15 19:15 UTC Modified: 2016-03-15 20:15 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:-2 (-100.0%)
From: michael dot sierks at priceline dot com Assigned:
Status: Closed Package: cURL related
PHP Version: master OS: Linux
Private report: No CVE-ID:
 [2016-03-15 19:15 UTC] michael dot sierks at priceline dot com
Description:
------------
The CURLOPT_NOPROXY option is applied as a long instead of a string. This causes the option to have no effect.

https://curl.haxx.se/libcurl/c/CURLOPT_NOPROXY.html


Test script:
---------------
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://google.com");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_VERBOSE, true);

// proxy settings
curl_setopt($ch, CURLOPT_PROXY, "my.local.proxy:8080");
curl_setopt($ch, CURLOPT_NOPROXY, "*");

curl_exec($ch);

Expected result:
----------------
You should see in the output the proxy is not used.

Actual result:
--------------
The proxy is used in all cases, even though a wildcard no-proxy option has been set for all urls.

Patches

fix_curlopt_noproxy_type (last revision 2016-03-15 19:16 UTC) by michael dot sierks at priceline dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-03-15 20:15 UTC] requinix@php.net
-Status: Open +Status: Verified -PHP Version: 5.5.33 +PHP Version: master
 [2016-03-21 08:44 UTC] laruence@php.net
Automatic comment on behalf of michael.sierks@priceline.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=efacdc3511c14f3200b31765bd0113da443e66ad
Log: FIX #71831: CURLOPT_NOPROXY applied as long instead of string
 [2016-03-21 08:44 UTC] laruence@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Wed Jun 28 12:01:42 2017 UTC