Guard against allowing intermediate caching when cookies are present
authorBryan Davis <bd808@wikimedia.org>
Wed, 24 Feb 2016 06:03:17 +0000 (23:03 -0700)
committerBryan Davis <bd808@wikimedia.org>
Mon, 29 Feb 2016 22:29:58 +0000 (15:29 -0700)
commit8b413431d760ffa8b00a9478f14f5058f033ee7b
treea187282b32d599a08a54f68e08f13c9177f3100f
parent65d17367b5353eb397f02f0448db59b6f6682263
Guard against allowing intermediate caching when cookies are present

Output cache-control headers that disable intermediate caching even if
OutputPage->mEnableClientCache is true when the response includes
set-cookie headers as well. This change mirrors logic that has been in
use on the Wikimedia Foundation production cluster's Varnish cache
system for over 2 years to guard against accidentally caching backend
responses which include Set-Cookie headers.

Co-Author: Max Semenik <maxsem.wiki@gmail.com>
Bug: T127993
Change-Id: I1a0d38a5b9dba754b91a7832371b3dc0df51bd5a
includes/OutputPage.php
includes/WebResponse.php