[wp-trac] [WordPress Trac] #43329: download_url function should return the body in response on error

WordPress Trac noreply at wordpress.org
Sat Mar 3 18:48:24 UTC 2018


#43329: download_url function should return the body in response on error
-------------------------+--------------------
 Reporter:  nextendweb   |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  5.0
Component:  HTTP API     |     Version:  4.9.4
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+--------------------

Comment (by soulseekah):

 This patch tucks up to 1kb (altered by filter) into the data of the error,
 so  `data['code']` and `data['body']` will contain the response code and
 up to 1km of the body.

 Useful for debugging purposes.

 Special thanks to @campusboy1987 @mihadan @SergeyBiryukov and others in
 the live coding stream of this ticket.

 Godspeed.

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


More information about the wp-trac mailing list