[wp-trac] [WordPress Trac] #17048: URLs delivered to the browser should be root-relative

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 11 14:09:11 UTC 2011


#17048: URLs delivered to the browser should be root-relative
--------------------------+-------------------------
 Reporter:  dmole         |       Owner:  edwardw
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:  3.1
 Severity:  normal        |  Resolution:  maybelater
 Keywords:  dev-feedback  |
--------------------------+-------------------------

Comment (by dmole):

 Replying to [comment:13 edwardw]:
 > What's wrong with replacing with whatever domain the user is on
 ({{{$_SERVER['HTTP_HOST']}}})?  With this method, you don't need to
 maintain a list of known network interfaces, since if the browser can
 access it, it must be accessible on that interface.

 I don't think you properly understood the problem, (there are reasons why
 URLS are not dynamic everywhere).

 A) Replacing link prefixes with $_SERVER['HTTP_HOST'] in ob_start really
 makes no difference because the browser will do it anyway, If there are
 any features that run in the background(from the fs not using a network)
 it might become meaningless, If an email is triggered from a local network
 non-local users will get useless links.

 B) Replacing $_SERVER['HTTP_HOST'] with "" in ob_start will not work
 because the links are not made with $_SERVER['HTTP_HOST'] they are made
 with some arbitrary DB or user controlled value.

 If you are suggesting something else please provide an example patch like
 nacin did to clearly test and convey your meaning.

 with more testing it becomes clear that the ob_start options are unusable
 because it misses headers like those used in redirects to wp-login.php,
 and it gets urls it should not like the "siteurl" setting itself.

 IMO the only reason reason this is not implemented is that it would be a
 big-ish patch, someone was planning to implement this when they made the
 "siteurl" setting separate from the "home" setting, because there is no
 other good reason to separate them.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17048#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list