Closed TheUltDev closed 8 years ago
+1
We definitely need this.
It looks like there is an issue with directory handling somewhere, because having a directory named /foo
and a file next to that directory /foo.gz
ends up redirecting requests for the directory foo
to end up getting the file that is in foo.gz
if the client accepts Gzip, otherwise the file redirect if the client does not accept Gzip.
Hi @Cavitt, I really appreciate the pull request and I hope you find my comments above useful. In general, we have not added this functionality due to not only the complexity, but that it has already been solved in a well-maintained module: https://github.com/code42day/connect-gzip-static
This PR adds support for serving gzipped files if they are found on disk, the client supports it, and the developer enables it explicitly.
I've added 4 test cases testing these conditions.