When using xrds_simple on a site with multiple languages the language prefix ends up in the `X-XRDS-Location` and `X-Yadis-Location` headers. I'm not sure what the proper behavior is, but this seems to be incorrect. This behavior makes it difficult to use a site as an OpenID provider, unless you use a different URI for each language on the site, which also seems wrong.

The attached patch passes a fake $language object to url() to prevent any prefixing of these paths.

CommentFileSizeAuthor
xrds_no_lang_prefix.patch945 bytesjmiccolis

Comments

roderik’s picture

Status: Active » Reviewed & tested by the community

Makes sense. Implemented, tested.

I agree that
- the URL of such a service must be 'canonical' (independent of site language setting)
- passing a fake $language object to url() is the only way of achieving this. (Unless you want to not use url() at all, in which you need your own setting for the advertised hostname. But I don't think that's sensible here.)

(I had the same thing with the Shorten + ShortURL modules, a while ago, which also provide a 'service' that should announce a language-independent URL. #628086 - not that you need to care.)

walkah’s picture

Status: Reviewed & tested by the community » Fixed

committed. thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.