[wp-trac] [WordPress Trac] #38231: Allow download_url to respect content-disposition header

WordPress Trac noreply at wordpress.org
Thu Oct 14 17:00:38 UTC 2021


#38231: Allow download_url to respect content-disposition header
--------------------------------------+------------------------------
 Reporter:  cklosows                  |       Owner:  johnjamesjacoby
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  5.9
Component:  HTTP API                  |     Version:  4.7
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by johnjamesjacoby):

 Hey @ocean90 👋 thank you for mentioning that. I was unaware and it seems
 like a good idea to use it.

 * It is a `public static` method so intended to be used elsewhere
 * It is always included by WordPress core
 * It has an array of unit tests already to match RFC6266

 [https://core.trac.wordpress.org/attachment/ticket/38231/38231.6.diff
 38231.6.diff] updates the approach to use it over the bespoke regular
 expression.

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


More information about the wp-trac mailing list