Files
caddy/modules
Jay Hemnani 4e6ad67427 templates: Delete file headers on any template error (#8149)
* 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)
2026-11-03 00:53:03 -05:00
..