Open De-Panther opened 1 year ago
Apparently there were already tests for gzip
and brotli
, and my first commit broke the Content-Type
tests.
I moved the defaultType
to the start of the process right after the options are parsed.
Also moved the MIME lookup to right after we get the file, which made redundant the special lookup for compressed files.
Some unrelated CLI tests don't work for me both on master and on this PR.
@thornjad is there something else I should do for this PR to be approved? Thanks
If file is already compressed (ends with
.gz
or.br
), no need to add those file extensions. Sometime files are already compressed and needs to serve with the correct header. In some cases engines like Unity output some of the files as compressed and others not.This change allows to serve already compressed files even if
Serve GZIP Files
orServe Brotli Files
are false.I'm not sure how to write a test, or if this change should be documented. It seems to me like an obvious outcome when serving a
.gz
or.br
file. So I think it's a bug fix rather than a feature or a change in a feature.Relevant issues
Resolves #844 Resolves #780
Contributor checklist
--help
outputmaster
branchMaintainer checklist