Page MenuHomePhabricator

MediaWiki returns Cache-Control: private for all HTTPS requests
Closed, ResolvedPublic

Description

This code:

in_array( $request->getFullRequestURL(), $requestTitle->getSquidURLs() )

is used to determine whether the current URL is cacheable. But for HTTPS views, getFullRequestURL() returns an HTTPS URL while getSquidURLs() returns an array of HTTP URLs, so the in_array() call will never return true and the request will never be considered cacheable.

This means cache misses from HTTPS users are never used to populate the cache :(

Event Timeline

Catrope created this task.Feb 16 2015, 8:30 PM
Catrope raised the priority of this task from to Needs Triage.
Catrope updated the task description. (Show Details)
Catrope added projects: HTTPS, HTTPS-by-default.
Catrope added a subscriber: Catrope.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 16 2015, 8:30 PM
gerritbot added a subscriber: gerritbot.

Change 190853 had a related patch set uploaded (by Catrope):
Fix URL comparison used for cacheability decision

https://gerrit.wikimedia.org/r/190853

Patch-For-Review

Nemo_bis set Security to None.

Change 190853 merged by jenkins-bot:
Fix URL comparison used for cacheability decision

https://gerrit.wikimedia.org/r/190853

Change 190937 had a related patch set uploaded (by Catrope):
Fix URL comparison used for cacheability decision

https://gerrit.wikimedia.org/r/190937

Patch-For-Review

Change 190937 merged by jenkins-bot:
Fix URL comparison used for cacheability decision

https://gerrit.wikimedia.org/r/190937

Change 190945 had a related patch set uploaded (by Catrope):
Fix URL comparison used for cacheability decision

https://gerrit.wikimedia.org/r/190945

Patch-For-Review

Change 190945 merged by jenkins-bot:
Fix URL comparison used for cacheability decision

https://gerrit.wikimedia.org/r/190945

Aklapper triaged this task as Medium priority.Feb 17 2015, 9:57 AM
Catrope closed this task as Resolved.Feb 22 2015, 9:52 PM
Catrope claimed this task.