This is an archive of the discontinued Mercurial Phabricator instance.

hgweb: discard Content-Type header for 304 responses (issue5844)
ClosedPublic

Authored by indygreg on Apr 30 2018, 8:37 PM.

Details

Summary

A side-effect of 98baf8dea553 was that hgwebdir always sets a global
default for the Content-Type header. HTTP 304 responses don't allow
the Content-Type header. So a side-effect of this change was that
HTTP 304 responses served via hgwebdir resulted in a ProgrammingError
being raised.

This commit teaches our 304 response issuing code to drop the
Content-Type header.

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 30 2018, 8:37 PM
krbullock accepted this revision.May 2 2018, 10:10 PM
This revision is now accepted and ready to land.May 2 2018, 10:10 PM
This revision was automatically updated to reflect the committed changes.