Opened 6 years ago
Last modified 4 years ago
#40153 new enhancement
Filter for wp_safe_remote_get in download_url
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.8 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
I had to deal with images on a server that has basic authentication active. There is no filter in download_url that would give me the chance to add the header authentication that I needed in this case.
Attachments (2)
Note: See
TracTickets for help on using
tickets.
I added a new patch for this issue.
Here are some key points about the new patch I attached 40153.2.diff.
download_url_remote_get_args
which was introduced.$args['timeout']
,$args['stream']
, and$args['filename']
.$args['timeout']
can be debatable. But I think it's enough thatdownload_url()
itself accepts the$timeout
params.$args['filename']
and$args['stream']
unless there's a good reason, these 2 should also be left untouched IMHO to prevent any unexpected issues to arise with howdownload_url()
currently works.