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

WordPress Trac noreply at wordpress.org
Sun Mar 4 17:13:37 UTC 2018


#43329: download_url function should return the body in response on error
----------------------------+-----------------------------
 Reporter:  nextendweb      |       Owner:  SergeyBiryukov
     Type:  enhancement     |      Status:  closed
 Priority:  normal          |   Milestone:  5.0
Component:  Filesystem API  |     Version:
 Severity:  normal          |  Resolution:  fixed
 Keywords:                  |     Focuses:
----------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:   => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"42773"]:
 {{{
 #!CommitTicketReference repository="" revision="42773"
 Filesystem API: Allow `download_url()` to return the response code and
 body on error as an additional `WP_Error` object data.

 The error response body size is limited to 1 KB by default to avoid taking
 up too much memory. The size can be increased using
 `download_url_error_max_body_size` filter.

 Props soulseekah, campusboy1987, mihdan, SergeyBiryukov.
 Fixes #43329.
 }}}

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


More information about the wp-trac mailing list