Page MenuHomePhabricator

[Bug] zhwiki page/references output not varying based on accept-language header
Open, NormalPublic

Description

Steps to Reproduce

  1. request https://zh.wikipedia.org/api/rest_v1/page/references/中國 with Accept-Language: zh-hant
  2. request https://zh.wikipedia.org/api/rest_v1/page/references/中國 with Accept-Language: zh-hans

Expected Results

  1. content is returned in the zh-hant variant
  2. content is returned in the zh-hans variant

Actual Results

The same script is returned for both requests, maybe whatever is cached

Event Timeline

JoeWalsh created this task.Aug 2 2019, 4:14 PM
Restricted Application added subscribers: Cosine02, Aklapper. · View Herald TranscriptAug 2 2019, 4:14 PM

The issue might be a lack of 'Accept-Language' in the PCS response Vary header. srwiki works fine and when testing locally PCS includes Accept-Language in the Vary header whereas zhwiki does not.

Change 527605 had a related patch set uploaded (by Joewalsh; owner: Joewalsh):
[mediawiki/services/mobileapps@master] Include Accept-Language in Vary header for mobileview pages

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

Change 527605 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Include Accept-Language in Vary header for mobileview pages

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