[wp-trac] [WordPress Trac] #11613: HTTP API may make a request on an unsupporting transport

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 24 02:03:36 UTC 2011


#11613: HTTP API may make a request on an unsupporting transport
--------------------------+------------------
 Reporter:  dd32          |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.2
Component:  HTTP          |     Version:  2.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------
Changes (by dd32):

 * milestone:  Future Release => 3.2


Comment:

 With the removal of the fopen transport (Which only supported GET
 requests), there is no longer a requirement for a difference in the
 GET/POST transport orders.

 This in addition to #8622 is preventing unit testing of the HTTP API as
 well.

 The following commit replaces _getTransport() & _postTransport() and adds
 a _dispatch_request() private method, the simple purpose of
 _dispatch_request() is to take the $args and determine a transport which
 the request can be made on, and then dispatch the request to that
 transport worker. (In addition, it clarifys the PHPDoc on the return of
 WP_HTTP::request() that it can return a WP_Error instance upon failure)

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


More information about the wp-trac mailing list