Skip to content

Conversation

@michelheusschen
Copy link
Contributor

What does this PR do?

Support for weights in the Accept-Encoding header was added to the compression middleware in #10777. However, the default weight is set to 0 while RFC 9110 says: If no "q" parameter is present, the default weight is 1.

This leads to inconsistent selection of the content encoding, see this example:

Accept-Encoding v3.1.2 This PR
gzip, br br br
gzip, br;q=0.9 br gzip

More

  • Added/updated tests
  • Added/updated documentation

Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks @michelheusschen 👍🏼

Copy link
Member

@rtribotte rtribotte left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@kevinpollet kevinpollet left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@traefiker traefiker force-pushed the acceptencoding-correct-weight branch from 60f467f to 63a4023 Compare October 8, 2024 09:34
@traefiker traefiker merged commit d339bfc into traefik:v3.1 Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants