[wp-trac] [WordPress Trac] #10855: Some WP_HTTP methods support HTTP PUT, but WP doesn't expose that capability

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 26 01:32:00 UTC 2009


#10855: Some WP_HTTP methods support HTTP PUT, but WP doesn't expose that
capability
--------------------------+-------------------------------------------------
 Reporter:  mdawaffe      |       Owner:  dd32                  
     Type:  defect (bug)  |      Status:  new                   
 Priority:  normal        |   Milestone:  2.9                   
Component:  HTTP          |     Version:  2.8.4                 
 Severity:  normal        |    Keywords:  has-patch dev-feedback
--------------------------+-------------------------------------------------

Comment(by mdawaffe):

 Replying to [comment:1 dd32]:
 > Does the ::test() methods check for PUT ability? Would be best to return
 a not-available error rather than attempting a PUT request with a
 transport that cant do it..

 ::test() doesn't check.  But as I understand it, all the methods we have
 that support POST can also support PUT.

 This patch is the bare minimum necessary to support PUT requests in these
 two methods.  Other methods supported PUT already.

 With this patch:

  * WP_Http_Fsockopen: GET, HEAD, POST, PUT, (any)
  * WP_Http_Fopen: GET
  * WP_Http_Streams: GET, HEAD, POST, PUT, (any)
  * WP_Http_ExtHTTP: GET, HEAD, POST, PUT, (could support more: would need
 more hardcoding)
  * WP_Http_Curl: GET, HEAD, POST, PUT, (could support any: would need a
 default case in the switch)

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


More information about the wp-trac mailing list