Replace XVO with support for the Key HTTP header
authorFaidon Liambotis <faidon@wikimedia.org>
Tue, 6 Oct 2015 07:01:10 +0000 (10:01 +0300)
committerOri Livneh <ori@wikimedia.org>
Thu, 8 Oct 2015 04:26:40 +0000 (21:26 -0700)
commit7e20cb51fe190bcf55ccee2ce3afacadce2e72d3
tree8de6a78e68011e5288d3d46e004aba44ce490667
parent5aee45ee9e8957cdb68fc895ef3ae0387642b895
Replace XVO with support for the Key HTTP header

MediaWiki currently has support for a header called X-Vary-Options
(XVO), used to communicate to upstream caches more granular cache
variance options than the Vary header can.

The header was envisioned by Tim Starling back in 2008 and implemented
into MediaWiki and Squid 2.0, with those patches submitted to the
squid-dev mailing list at the time:
http://www.squid-cache.org/mail-archive/squid-dev/200802/0085.html
The patches never actually made it into an upstream Squid release,
however, and Squid has since evolved in potentially significant ways.

Wikimedia has since switched to Varnish but XVO was not ported over as
it was deemed too complex at the time; custom VCL was used instead. To
our knowledge, noone else is using XVO in production and certainly not
with recent, up-to-date MediaWiki releases.

There is currently work at IETF's httpbis working group for a "Key"
header that is in concept and implementation very similar to Tim's XVO
header: https://datatracker.ietf.org/doc/draft-fielding-http-key/

Rather than rip XVO out of MediaWiki, replace it with support for the
Key header, as preliminary defined by the draft spec. This is an almost
straight search-and-replace.

No other software (caching proxy or user-agent) currently implements Key
to my knowledge, so this is essentially untested.

Change-Id: I949fc289dd5d48bd34f3b37f7739e2b9cd5db277
RELEASE-NOTES-1.27
includes/DefaultSettings.php
includes/OutputHandler.php
includes/OutputPage.php
includes/api/ApiMain.php
tests/phpunit/includes/OutputPageTest.php