@Christian Bacher / @Bertrand Dunogier: In the wake of the JS REST client issue from @[~firstname.lastname@example.org] about having to have domain and prefix separated we talked about this should not be needed as prefix can be anything, even the domain only. So with that in mind it would be more beneficial that 5.2 only returned relative urls relative to the endpoint, so REST server doesn't need to know about any of the Symfony setup surrounding this and no need to inject this.
Currently, as of this patch, a Rest client gets an endpoint (includes domain + optional siteaccess url part + REST prefix) and then start to fetch info, however it gets urls with prefix back, which is exactly why Damien voiced that REST client need both domain and prefix as it now needs to append domain to the urls without prefix ending up twice in the url.
So to not have to have to deal with buggy string comparison in every rest client to extract the domain (and potentially SiteAccess url piece which is before REST prefix in URI), and to not have to make REST server aware of the Symfony details like prefix: Lets just return the relative url, relative to the end point. In this scenario REST client always only have to deal with <end/point/> + <relative/url> to get the full URI.
As opposed to using absolute urls to solve the dilemma in the "Why", using REST only relative url's is better for cache as it can be shared across several SiteAccesses, the REST endpoint can if we want to be different from one SiteAccess to another.