[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:24:29 UTC 2014


#30371: Allow for // rooted URLs in http request() calls (wp_remote_get(), etc)
-------------------------------+------------------------------
 Reporter:  dmchale            |       Owner:
     Type:  enhancement        |      Status:  reopened
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  HTTP API           |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:  2nd-opinion close  |     Focuses:
-------------------------------+------------------------------

Comment (by rmccue):

 At the end of the day, this boils down to WP HTTP not supporting relative
 URLs, intentionally. These URLs are relative, not absolute; despite
 containing a host/authority part, they're protocol-relative. Without a
 base URI (or context, as dd32 called it), there's not enough information
 to build an absolute URI.

 What we ''could'' do is check if a given URL starts with `/`, and give a
 message to the effect of "Relative URLs are not supported for HTTP
 requests". I'm +0 on that personally.

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


More information about the wp-trac mailing list