[wp-trac] [WordPress Trac] #30371: Allow for // rooted URLs in http request() calls (wp_remote_get(), etc)
WordPress Trac
noreply at wordpress.org
Tue Nov 25 01:43:44 UTC 2014
#30371: Allow for // rooted URLs in http request() calls (wp_remote_get(), etc)
-------------------------------+----------------------
Reporter: dmchale | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: HTTP API | Version: trunk
Severity: normal | Resolution: wontfix
Keywords: 2nd-opinion close | Focuses:
-------------------------------+----------------------
Changes (by dd32):
* status: reopened => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
After taking a 2nd look at the possibilities for a relative-url error, I
realised that requests such as `ftp://example.com/example.jpg` will be
presented to WP_HTTP as `//example.com/example.jpg` as
`wp_kses_bad_protocol()` will strip non http/https/ssl schemas.
Additionally, if you're using `wp_safe_remote_*()` methods you'll also get
the existing error in the event that the URL is deemed unsafe.
I'm marking this as wontfix, based on the error being generic and covering
a multitude of cases that can't really be separated out easily.
It's up to a developer to pass a properly formed URL, and there are a
bunch of caveats to that, a developer should be able to look at what input
they're providing, and understand why a HTTP client cannot handle that
URL.
Perhaps when/if we add a logging layer we can expand on the cases here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30371#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list