[wp-trac] [WordPress Trac] #39687: Request headers sent incorrectly from `WP_Http` to `Requests`

WordPress Trac noreply at wordpress.org
Fri Jan 27 08:51:26 UTC 2017


#39687: Request headers sent incorrectly from `WP_Http` to `Requests`
-----------------------------------+------------------------------
 Reporter:  flixos90               |       Owner:
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  HTTP API               |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------------------

Comment (by flixos90):

 @dd32 Thanks for providing some background on this, now I see where this
 code comes from.
 I like the idea that we could add a third parameter to
 `WP_Http::processHeaders()`, a flag called `$is_request`. Then based on
 this flag, if we're verifying request headers, the code from
 [attachment:39687.diff] should be applied, otherwise the code as it is now
 should be applied.
 We would be backward-compatible here, and at the same time allow passing
 headers like `[ 'Header: Value1', 'Header: Value2' ]`.

 In either way, I think we need to clarify the docs for the `headers`
 argument of `wp_remote_request()` accordingly.

 I would tend to use `needs-refresh`. :)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39687#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list