On Fri, Jun 17, 2011 at 3:42 PM, Roan Kattouw <roan.katt...@gmail.com>wrote:

> On Sat, Jun 18, 2011 at 12:32 AM, Brion Vibber <br...@wikimedia.org>
> wrote:
> > Is there a handy config snippet people can use to test things against
> their
> > local installs in the meantime?
> >
> Afraid not. We have to change hardcoded http:// prefixes in a million
> different places, see
> http://wikitech.wikimedia.org/view/Https#Protocol-relative_URLs . The
> logos are largely monkey work (regex them, then get a team to verify
> 100s of hopefully-not-broken logos), but other things are much more
> sensitive. It'd suck to break the setting that determines where the
> uploaded files on Commons live
> (http://upload.wikimedia.org/site/lang/etc) or where our static assets
> and RL things are served from (bits), especially if broken URLs get
> cached in Squid and/or memcached. This is why we're scheduling this
> thing this far out when Ryan and I will both be available to very
> carefully go about this.
>

Great that we have a list! :D

Do make sure that all of those individual settings get tested before
touching the production cluster; I'd be particularly worried about the
possibility of exposing '//domain/something' style URLs into output that
requires a fully-clickable link.

It looks like wfExpandUrl() *does* correctly expand protocol-relative URLs
against the current $wgServer setting, so a lot of things that already
expect to handle path-relative URLs should already be fine.

But some like the interwikis may be assuming fully-qualified URLs; for
instance on API results those should probably return fully-qualified URLs
but they're probably not running through wfExpandURL.

ApiQueryIWLinks for instance returns interwiki links retrieved via
$title->getFullURL(); for interwiki cases this takes whatever was returned
by $interwiki->getURL() (which would in this case presumably be the '//
fr.wikipedia.org/wiki/$1' form) and passes it back, without making any
attempt to expand it further.

This'll probably need refactoring to that getLocalURL() handles the regular
interwiki URLs, then in getFullURL() we go ahead and call that and pass the
result through wfExpandUrl().

-- brion
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to