[wp-trac] [WordPress Trac] #37722: wp_remote_retrieve_headers no longer an array in WordPress 4.6

WordPress Trac noreply at wordpress.org
Thu Aug 18 22:52:05 UTC 2016


#37722: wp_remote_retrieve_headers no longer an array in WordPress 4.6
--------------------------+--------------------
 Reporter:  jstkrn        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.6.1
Component:  HTTP API      |     Version:  4.6
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+--------------------

Comment (by dd32):

 > Previously, there was the same issue with responses, see [37989]. We
 should be consistent with return types, so I'd consider this a bug.

 We only really changed the return type for the main request object due to
 the number of plugins who would assume `!is_array()` was a failed HTTP
 request, even though that was a bad habit to be in.

 We saw that this may also have the same issue, however deliberately chose
 to break this not-really-supported scenario, the benefits of the case
 insensitive dictionary are worth it, and we I don't think we could easily
 present the original-cased headers anyway.

 As such, I consider this a documentation update, which doesn't need to be
 in 4.6.1 (unless someone else feels it should be)

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


More information about the wp-trac mailing list