mirror of
https://github.com/caddyserver/caddy.git
synced 2026-11-14 04:33:26 +00:00
* templates: Delete file headers on any template error
A template that fails to parse or execute (not only {{httpError}}) left
the Content-Length, Etag and related headers set by file_server on the
error response, so clients received a 500 that declared the file's size
but had no body.
* templates: Also delete Content-Encoding and Content-Range on errors
Precompressed and ranged file responses could leave these headers on the
replacement error response.
(cherry picked from commit 6727b2f3a9)