[wp-trac] [WordPress Trac] #37437: Requests_Cookie::parse() unable to parse WP_Http_Cookie object coming from WP_Http::request()
WordPress Trac
noreply at wordpress.org
Sat Jul 23 14:07:33 UTC 2016
#37437: Requests_Cookie::parse() unable to parse WP_Http_Cookie object coming from
WP_Http::request()
--------------------------+-----------------------
Reporter: stephdau | Owner: rmccue
Type: defect (bug) | Status: assigned
Priority: high | Milestone: 4.6
Component: HTTP API | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------
Comment (by rmccue):
I think we need to add a `normalize_cookies()` to `WP_Http` that maps
`WP_Http_Cookie` instances to `Requests_Cookie`. We can then pass in an
array of these instances instead.
Replying to [comment:3 stephdau]:
> Also, the value of auth cookies shouldn't really hit that `parse()`
method as stored in the object in the 1st place, since their format does
not match. Hence my thoughts about "fixing" it higher (but that
`explode()` call should be hardened anyways).
The `parse()` call is used when receiving cookies (hence the
`static`-ness), we shouldn't need it when sending. We can just instantiate
`Requests_Cookie` directly instead.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37437#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list