You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't skip normal locale negotiation if Accept-Language is set (#17968)
* Add failing test
* Accept-Language shouldn't bypass local negotiation
This should more closely mimic https://github.com/pypi/infra/blob/d5374e6e92f5a09729d649a0a587935d19f2d76f/terraform/warehouse/vcl/main.vcl#L160-L174
* Update test to use AcceptLanguageValidHeader
* Add failing test for Accept-Language fallback
* Don't renegotiate possibly unknown default locale
Currently if the default locale negotiation fails, we fall back to
trying to match based on Accept-Language. If this fails, it falls back
on the default value, but because we re-negotiate the locale to
determine the default value (without determining if the default is a
known locale) we could potentially still set a garbage locale.
Since the default for the default_match in best_match is already `None`,
we can just use the default instead of re-negotiating.
0 commit comments