[wp-trac] [WordPress Trac] #25716: HTTP requests fails with "SSL read: error:00000000:lib(0):func(0):reason( 0), errno 0"

WordPress Trac noreply at wordpress.org
Sat Oct 26 18:08:10 UTC 2013


#25716: HTTP requests fails with "SSL read: error:00000000:lib(0):func(0):reason(
0), errno 0"
-----------------------------+--------------------
 Reporter:  ocean90          |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  highest omg bbq  |   Milestone:  3.7.1
Component:  HTTP             |     Version:  3.7
 Severity:  blocker          |  Resolution:
 Keywords:  needs-testing    |
-----------------------------+--------------------

Comment (by nacin):

 [attachment:25716.2.diff] introduces a new string (we may just keep it in
 English for 3.7.1, as core language packs are not up-and-running yet) and
 reuses an existing one.

 The only problem with a warning is that it could cause headers-already-
 sent issues. Probably a few situations in updates and such where that can
 be a problem.

 Issuing just a notice when `headers_sent() || WP_DEBUG ? E_USER_WARNING :
 E_USER_NOTICE` is cheap but it works.

 This patch was lightly tested, but I probably screwed something up. Each
 piece must be tested.

 My testing code:

 {{{
 add_filter( 'pre_http_request', function( $result, $args, $url ) {
         if ( 0 === strpos( $url, 'https://' ) )
                 return new WP_Error( 'ssl_failed' );
         return $result;
 }, 10, 3 );
 }}}

 Also, here's some code someone can use to fix their site:

 {{{
 add_filter( 'use_curl_transport', 'wp_ticket_25716_ssl_not_supported' );
 add_filter( 'use_streams_transport', 'wp_ticket_25716_ssl_not_supported'
 );
 function wp_ticket_25716_ssl_not_supported( $test, $args ) {
     if ( ! empty( $args['ssl'] ) )
         return false;
     return $test;
 }
 }}}

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


More information about the wp-trac mailing list