This is an archive of the discontinued Mercurial Phabricator instance.

httppeer: always add x-hg* headers to Vary header
ClosedPublic

Authored by indygreg on Apr 10 2018, 9:28 PM.

Details

Summary

Before, we manually updated the Vary header value for each
header contributing to it.

All X-Hg* headers are reserved for the Mercurial protocol and
could have caching implications. So it makes sense to always add
these headers to Vary.

A test revealed that X-HgArgs-Post wasn't being added to Vary.
This is only sent on POST requests. POST requests generally
aren't cacheable. However, it is possible if the server sends
the appropriate headers. Mercurial shouldn't be sending those
headers. But let's not take any chances.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Apr 10 2018, 9:28 PM
durin42 accepted this revision.Apr 11 2018, 12:50 PM
This revision is now accepted and ready to land.Apr 11 2018, 12:50 PM
This revision was automatically updated to reflect the committed changes.