[wp-trac] [WordPress Trac] #16978: Move the PHP HTTP Extension priority down the list for WP_HTTP

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 27 02:50:47 UTC 2011


#16978: Move the PHP HTTP Extension priority down the list for WP_HTTP
--------------------------+--------------------------------------
 Reporter:  dd32          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  HTTP          |    Version:  3.1
 Severity:  normal        |   Keywords:  dev-feedback 2nd-opinion
--------------------------+--------------------------------------
 Currently the PHP HTTP Extension is receiving the top priority slot for
 which transport HTTP requests go out through.

 However, the extension is also the least tested, and also now uses the
 most memory when using Stream-to-file functionality for downloads.

 In addition to this, in most cases the HTTP Extension appears to be a
 simple cURL wrapper, falling back to fopen() & friends for certain
 functionality. This leads to cURL being available in most cases, and given
 we can control cURL's options easier than we can the HTTP extension, it
 makes sense to bump that up to position 1.

 In addition to this, the extension's ::test() method does not seem to
 cover all bases, leading back to the least-tested. For example, it
 requires the .ini setting 'allow_url_fopen' to be enabled for certain
 functionalities (HEAD Requests & Certain redirection cases) - For example,
 it fails with this on 4 of the 14 unit tests:
 {{{
 file_get_contents(): http:// wrapper is disabled in the server
 configuration by allow_url_fopen=0
 }}}

 So reasons:
  * Least Tested (historically at least, It may become more tested as PHP5
 is more common)
  * Requires more memory for Stream-to-file (Can use an extra ~9MB for
 downloading a 3MB file compared to using Curl, Streams, or fsockopen)
  * Can't make non-blocking requests (In this case, it's already the last
 transport that is tried)

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


More information about the wp-trac mailing list