[wp-trac] [WordPress Trac] #29886: WP_HTTP::make_absolute_url() treats schemeless URLs as relative
WordPress Trac
noreply at wordpress.org
Wed Oct 8 05:56:09 UTC 2014
#29886: WP_HTTP::make_absolute_url() treats schemeless URLs as relative
--------------------------+-------------------
Reporter: dd32 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.1
Component: HTTP API | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-------------------
Currently if you pass `WP_HTTP::make_absolute_url()` a scheme-less url,
it's converted to a absolute url based on the current domain, ignoring the
host of the schemeless url.
Although Schemeless URL's are invalid in HTTP Headers, since this is a
helper function used elsewhere, and because many systems don't follow the
specifications strictly, we should handle schemeless url's correctly.
The correct option for this function appears to be to convert it to a
protocol relative url, safe for use in a HTTP request.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29886>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list