Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

middleware.Compress should by default compress text/xml, application/xml, and arguably text/* #920

Open
eteran opened this issue Jun 9, 2024 · 3 comments

Comments

@eteran
Copy link

eteran commented Jun 9, 2024

As the title suggests, I think that text/xml and application/xml should be in defaultCompressibleContentTypes given that it is text and will compress very effectively in nearly all situations. I think it is pretty common to compress XML data.

For now, of course I can manually provide the list of types.

@VojtechVitek
Copy link
Contributor

@eteran I agree. Feel free to submit a PR.

@eteran
Copy link
Author

eteran commented Jun 12, 2024

Here's a link to the PR: #921

It does two things:

  1. it makes the default list reuse the same logic as the custom list so it also supports wild cards
  2. changes the default list to have text/* and application/xml

If you prefer that the default list not support wildcards, I can change the PR to just add the two mime-types for XML, but personally I think all of text/* should likely be compressed

@eteran
Copy link
Author

eteran commented Jun 24, 2024

@VojtechVitek don't mean to bug, but I just wanted to check in. The PR is currently waiting for approval to run the CI workflow. If you're busy, no worries, just didn't want it to fall through the cracks. Thanks!

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

No branches or pull requests

2 participants