[wp-trac] [WordPress Trac] #21446: plugins using curl with IPV6 enabled servers

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 9 10:41:35 UTC 2012


#21446: plugins using curl with IPV6 enabled servers
-------------------------+------------------------------
 Reporter:  mippie32     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  HTTP         |     Version:  3.4.1
 Severity:  normal       |  Resolution:
 Keywords:  close        |
-------------------------+------------------------------
Changes (by dd32):

 * keywords:  needs-testing => close


Comment:

 While I've never had a issue with curl and ipv4/6 connections.. googling
 around does indeed suggest curl has issues in certain circumstances.

 Specifically, if the server claims to support ipv6 routing to a global
 subnet, and it doesn't, curl will simply timeout connecting to the ipv6
 address and return a connection error, whereas most browsers would attempt
 the ipv6 connection, expect users to have bad configurations, and attempt
 an ipv4 connection.

 Ultimately this is down to a server misconfiguration - either the one curl
 is running on, or the server being connected to, one is advertising itself
 as ipv6 enabled when it actually isn't (or there's network issues).

 I don't think that disabling ipv6 globally for all instances of WP_HTTP is
 a viable option, it's not in the spirit of progress.. If anything, we
 should do all that we can to enable transitions to take place (which we
 are doing, by supporting ipv6 in any way that we need to).

 A work around for servers with bad configurations would be using the
 filters available and doing something like this in a plugin or mu-plugin
 even.

 {{{
 add_action( 'http_api_curl', function( $curl_handle ) {
    curl_setopt( $curl_handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
 });
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21446#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list