[wp-trac] [WordPress Trac] #14786: It's WP_Http_ExtHTTP not WP_Http_ExtHttp

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 6 08:55:31 UTC 2010


#14786: It's WP_Http_ExtHTTP not WP_Http_ExtHttp
--------------------------+-------------------------------------------------
 Reporter:  hakre         |       Owner:                        
     Type:  defect (bug)  |      Status:  new                   
 Priority:  normal        |   Milestone:  Awaiting Review       
Component:  HTTP          |     Version:  3.0.1                 
 Severity:  normal        |    Keywords:  has-patch dev-feedback
--------------------------+-------------------------------------------------

Comment(by hakre):

 Replying to [comment:7 jacobsantos]:
 > {{{$context}}} was added in PHP5, which streams relies on.
 ACK, my previous comment regarding fopen is wrong then, please ignore it.
 The WP_Http-stream class needs context, it's actually checked inside of
 it.
 ----
 Replying to [comment:8 dd32]:
 > ...
  {{{
  is_scalar( $named ) && ( $named = array( (string) $named ) );
  foreach ( $named as $context ) {
  }}}
 >
 > Can be simplified to:
  {{{
  foreach ( (array)$named as $context ) {
  }}}
 The casting to array will prevent future use of other iterators than
 array. That's why I didn't suggested that one. It might not look that
 important in this case, but generally this casting to array in foreach
 ''should'' be considered bad practice because it removes flexibilty from
 froeach. There are some articels which explain that with greater detail.
 ----
 Replying to [comment:8 dd32]:
 > I think originally, The priority orders for Get/Post were different,
 which is why there are 2 methods?
 From what I read (but please double check) both have the same order.
 Anyway, as this function already uses an array for the priority order, it
 should be easy to extend it to something configure-able.

 > I'd rather see WP_HTTP_Fopen::test() return false for POST requests to
 limit the locations which detects which transport is available

 I'll add an additional patch that is reflecting that.

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


More information about the wp-trac mailing list