Skip to content

Conversation

KernelDeimos
Copy link
Contributor

@KernelDeimos KernelDeimos commented Sep 22, 2025

This PR includes changes made by @azeitler and puts these changes behind the --force-content-encoding flag to prevent regressions. I need to figure out how to unit test this, that's the only thing blocking merge into master right now.

Relevant issues
Contributor checklist
  • Provide tests for the changes (unless documentation-only)
  • Documented any new features, CLI switches, etc. (if applicable)
    • Server --help output
    • README.md
    • doc/http-server.1 (use the same format as other entries)
  • The pull request is being made against the master branch
Maintainer checklist
  • Assign a version triage tag
  • Approve tests if applicable

azeitler and others added 3 commits September 22, 2025 15:28
* Add handling of brotli/gzip pre-compressed files

Serving pre-compressed brotli/gzip files was not working before, because a file.br.br against the pre-compressed file.br check always returned false.

* Bump version from 14.1.1 to 14.1.2
This fixes an issue recently introduced where file extensions ending
with `br` are handled even when the dot does not immediately
preceded. This introduces erroneous an error when trying to access
files with other extensions ending with `br`, such as `.cbr`.

I meant to merge the previous PR with this fix included but forgot to
commit the suggestion I added in the PR review. This was merged to a
feature branch so the main branch was not affected.
Adds --force-content-encoding flag which must be specified to enable
the behavior of including the Content-Encoding header in the response
when a .br or .gz file is directly requested in the URL.
Tests whether or not Content-Encoding is present under different cases
with and without the --force-content-encoding flag set.
@KernelDeimos KernelDeimos merged commit f265197 into master Sep 26, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants