[wp-trac] [WordPress Trac] #23310: WP_Http_Curl doesn't return errors for non-blocking requests

WordPress Trac noreply at wordpress.org
Mon Jan 28 16:12:07 UTC 2013


#23310: WP_Http_Curl doesn't return errors for non-blocking requests
-----------------------------+--------------------------
 Reporter:  SergeyBiryukov   |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  HTTP
  Version:                   |   Severity:  normal
 Keywords:  has-patch        |
-----------------------------+--------------------------
 Noticed while debugging #23133.

 If a server blocks local connections, `WP_Http_Streams` and
 `WP_Http_Fsockopen` return errors for both blocking and non-blocking
 requests:
 {{{
 WP_Http_Streams: Could not open handle for fopen() to ...
 WP_Http_Fsockopen: "110: Connection timed out"
 }}}

 `WP_Http_Curl`, however, just returns an empty response, which makes
 debugging more difficult: [[BR]]
 http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/class-
 http.php#L1145

 The actual error message that `curl_error()` returned was "couldn't
 connect to host".

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23310>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list