Page MenuHomePhabricator

Content-type version mismatch is disabling caching of mobile-html-offline-resources responses
Closed, ResolvedPublic

Description

Somehow the expected current endpoint versions for mobile-html-offline-resources are out of sync between mobileapps and restbase. restbase expects 1.2.1 but mobileapps sends 1.2.0. Receiving an actual response version less than the expected version causes RESTBase to apply a cache-control header (cache-control: max-age=0, s-maxage=0) that disables all caching: https://github.com/wikimedia/restbase/blob/master/lib/ensure_content_type.js#L25-L78

I verified in Logstash that this condition is the cause of the caching-disabling header being applied: https://logstash.wikimedia.org/goto/6dc8de0886b96de464be6fb00c68460d

Mobileapps should be updated to send version number 1.2.1 for mobile-html-offline-resources to prevent this.

Event Timeline

Change 608894 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[mediawiki/services/mobileapps@master] mobile-html-offline-resources: bump endpoint version to 1.2.1

https://gerrit.wikimedia.org/r/c/mediawiki/services/mobileapps/ /608894

Change 608894 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] mobile-html-offline-resources: bump endpoint version to 1.2.1

https://gerrit.wikimedia.org/r/c/mediawiki/services/mobileapps/ /608894