Use header_register_callback to avoid caching responses with Set-Cookie headers
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 8 Mar 2016 17:46:05 +0000 (12:46 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Tue, 8 Mar 2016 19:38:22 +0000 (14:38 -0500)
commitb84fae0173b235418eb59f0a3911262066d524ff
tree346695d968bf0ceedebd0090da97c126d4b57292
parentddf2afdee2faeb5ee102e5d13933495890212ffc
Use header_register_callback to avoid caching responses with Set-Cookie headers

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.

Bug: T127993
Change-Id: Ic79cf6c959dd870d6458874a9bffe9e25aba4919
includes/Setup.php
includes/WebRequest.php