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

feat(gzip): support special * to match any type #4817

Merged
merged 2 commits into from
Aug 16, 2021

Conversation

RocFang
Copy link
Contributor

@RocFang RocFang commented Aug 13, 2021

What this PR does / why we need it:

right now, type of types attr is array, and we dont't have a method to support the special gzip_types * config in Nginx Core. So maybe we can change type of types to support single string, and support * too.

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

},
},
{
type = "string",
Copy link
Member

Choose a reason for hiding this comment

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

I think enum = {"*"} is enough?

Copy link
Contributor Author

@RocFang RocFang Aug 13, 2021

Choose a reason for hiding this comment

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

@spacewander Yes, I think it's simpler to use {"*"}, this pr only try to follow nginx's config strictly.
If that not import, I will change it to {"*"}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

misunderstood you firstly, now i got it.

t/plugin/gzip.t Outdated
@@ -436,6 +436,53 @@ POST /echo
012345678
--- more_headers
Accept-Encoding: gzip
Content-Type: text/html
Copy link
Member

Choose a reason for hiding this comment

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

Better to use a special type to verify that any type can be matched.

@RocFang RocFang changed the title feat(gzip): support single string type and * to match any type feat(gzip): support special * to match any type Aug 13, 2021
@spacewander spacewander merged commit e244940 into apache:master Aug 16, 2021
@RocFang RocFang deleted the glob_gzip branch August 16, 2021 08:48
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.

3 participants