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

changed the NewCompressor logic to be support wildcards in the defaul… #921

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eteran
Copy link

@eteran eteran commented Jun 12, 2024

  • changed the NewCompressor logic to be support wildcards in the default set like it already did for a custom list by reusing that logic
  • made defaultCompressibleContentTypes contain "text/*" as all text mime types are arguably very compressible added
  • application/xml to defaultCompressibleContentTypes since it is also a common XML mime type

…t set like it already did for a custom list by reusing that logic

made defaultCompressibleContentTypes contain "text/*" as all text mime types are arguably very compressible
added application/xml to defaultCompressibleContentTypes since it is also a common XML mime type
@VojtechVitek
Copy link
Contributor

@Neurostep can you help review this please?

@eteran
Copy link
Author

eteran commented Jun 28, 2024

Looks like it fails here:

--- FAIL: TestCompressorWildcards (0.01s)
    --- FAIL: TestCompressorWildcards/defaults (0.00s)

So perhaps I just need to update the tests now that some other things are being compressed. I'll see if I can fix it real quick

7 regular rules and 1 wildcard in the default ruleset
@eteran
Copy link
Author

eteran commented Jun 28, 2024

@VojtechVitek , @Neurostep

I updated the tests and now things pass locally. However, it looks like perhaps the CI workflow didn't rerun on github?

Copy link
Contributor

@Neurostep Neurostep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall changes look good to me 👍 I wonder if we should bump the minor version here since we are going to change the default behavior of the middleware and all of a sudden for some clients the middleware is going to compress all text/* content types 🤔

@eteran
Copy link
Author

eteran commented Jul 11, 2024

@Neurostep / @VojtechVitek

Just wanted to follow up to see if there was anything you need on my end to help move things to the next steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants