-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Content-Length is incorrect when using gzip on static files with HEAD #2892
Copy link
Copy link
Closed
Description
1. Which version of Caddy are you using (caddy -version)?
1.0.3
2. What are you trying to do?
use gzip compression in combination with HEAD and static file hosting
3. What is your Caddyfile?
localhost:2015
gzip
4. How did you run Caddy (give the full command and describe the execution environment)?
caddy on nixpkgs
5. Please paste any relevant HTTP request(s) here.
curl -I --compressed http://localhost:2015/test.txt (or any other file that exists and would be gzipped normally)
6. What did you expect to see?
a Content-Encoding of gzip and a Content-Length of about 13000, which is the size of the gzipped text file
7. What did you see instead (give full error messages and/or log)?
a Content-Encoding of gzip and a Content-Length of ... 23, always, no matter what file i try to read (presuming it gets gzip'd)
8. Why is this a bug, and how do you think this should be fixed?
The Content-Length does not match the gzip'd content, and instead matches the size of a gzip'd empty file, which is not what this is.
9. What are you doing to work around the problem in the meantime?
disabling compression :(
10. Please link to any related issues, pull requests, and/or discussion.
(N/A)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels