-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
test-caseThe first priority of this issue is adding a testThe first priority of this issue is adding a test
Description
I'm trying to serve compressed versions of my HTML files. I've added the -g
flag and I see Serve GZIP Files: true
during startup. I've zipped a test file using gzip.
- When I try to access the file without the
.gz
extension I get a 404 - When I access the file with
.gz
I get the gzipped file - When I copy the unzipped file and try to access that I am served the unzipped file (no Content-Encoding response header) - although for the screenshot I simply copied the compressed file without
.gz
extension.
As you can see in the screenshot the request header contains Accept-Encoding: gzip
.
I'm basically seeing this issue but I'm on version 14.1.1
Environment Versions
- Node version: 20.8.0 (node:20.8.0-slim docker image)
- http-server version: 14.1.1
Steps to reproduce
Run http-server with -g
flag and try to access a file (without .gz
extension) for which a .gz
version is available.
Expected result
The gzipped file is being served and decompressed client side.
Actual result
404 when trying to access the file without .gz
extension.
cosmoburn and danhumphrey
Metadata
Metadata
Assignees
Labels
test-caseThe first priority of this issue is adding a testThe first priority of this issue is adding a test