[wp-trac] [WordPress Trac] #37614: WP_PROXY_BYPASS_HOSTS has no effect inside curl transport, if http_proxy or https_proxy is set on the system

WordPress Trac noreply at wordpress.org
Tue Aug 9 13:20:23 UTC 2016


#37614: WP_PROXY_BYPASS_HOSTS has no effect inside curl transport, if http_proxy or
https_proxy is set on the system
--------------------------+-----------------------------
 Reporter:  fliespl       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  HTTP API      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 OS: Debian Squeeze
 PHP Version tested: 5.3.29

 Will try to provide results from newer distros later today.


 --

 In case server hosting website has environmental settings for proxy, it's
 not possible to skip using it even for addresses that should be bypassed.


 Let's take for example that printenv returns following:
 {{{
 http_proxy=http://proxy.com:8080
 https_proxy=http://proxy.com::8080
 }}}

 In this case, if we execute `wp_remote_get` (with domain that should be
 bypassed via WP_PROXY_BYPASS_HOSTS) it will still use system variable
 http_proxy in curl transport.

 I think that wp_remote_get should explicitely set `curl_setopt($handle,
 CURLOPT_PROXY, null);`, if proxy is disabled inside wordpress or url
 SHOULD be bypassed.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37614>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list