[wp-trac] [WordPress Trac] #14184: HTTP API is not allowing '0' for headers and cookies.

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 27 09:50:18 UTC 2012


#14184: HTTP API is not allowing '0' for headers and cookies.
--------------------------+-----------------------
 Reporter:  mailnew2ster  |       Owner:  dd32
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  3.5
Component:  HTTP          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+-----------------------
Changes (by duck_):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Replying to [comment:24 dd32]:
 > In [22047]:
 > {{{
 > #!CommitTicketReference repository="" revision="22047"
 > Allow wp_remote_post to send a body consisting of entirely '0', which
 may be used when PUT'ing or POST'ing data to a API which accepts a raw
 chunk of data rather than key=value pairs (Such as some REST API's). Fixes
 #14184
 > }}}

 {{{
 Warning: strlen() expects parameter 1 to be string, array given in wp-
 includes/class-http.php on line 172
 }}}

 We're doing `strlen( $r['body'] )` and then immediately checking if
 `is_array( $r['body'] ) || is_object( $r['body'] )`.

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


More information about the wp-trac mailing list