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

If an encoding has a qvalue strip it #2630

Closed

Conversation

rouzier
Copy link

@rouzier rouzier commented May 29, 2019


name: Pull request
about: Take in consideration the the qvalue when matching Accept-Encoding
title: ''
labels: ''
assignees: ''

1. What does this change do, exactly?

Take in consideration the the qvalue when matching Accept-Encoding.
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3

2. Checklist

  • I have written tests and verified that they fail without my change
  • I have squashed any insignificant commits
  • This change has comments explaining package types, values, functions, and non-obvious lines of code
  • I am willing to help maintain this change if there are issues with it later

@mholt
Copy link
Member

mholt commented May 29, 2019

Thanks... someone will review this eventually. :)

What is your specific use case / need for this (advanced content negotiation)? i.e. what are your actual requirements?

@rouzier
Copy link
Author

rouzier commented May 29, 2019

None.
I was reviewing the code and I noticed that qvalue was not properly handled.
So I supplied a fix.

@mholt
Copy link
Member

mholt commented May 29, 2019

Okay. I appreciate it, I really do! But since there isn't an actual use case for it yet, it isn't a huge priority for me personally (Caddy 2 is currently on my plate, and if q-factor'ed content negotiation is important, I can work it into Caddy 2). But I see that this is a decent change since it has tests; albeit the feature is only partially implemented (which is still OK).

If someone considers this a priority they are welcome to review it and I can see about merging it in, I just can't get to it myself quite right now. Thanks!

@rouzier
Copy link
Author

rouzier commented May 31, 2019 via email

@mholt
Copy link
Member

mholt commented Jul 18, 2019

FWIW, Caddy 2 does have content negotiation respecting q-values with regards to dynamic encodings: https://sourcegraph.com/github.com/caddyserver/caddy@0d3f99e85a089a6a772ae38f426b5cd5f2f4583f/-/blob/modules/caddyhttp/encode/encode.go#L232

However, content negotiation in general still needs work. I am tracking this in #2665. Although, I am not sure if a matcher is the right approach anymore. (Discuss before implementing!) But would be happy to have your help on it if you're interested.

@mholt mholt closed this Jul 18, 2019
@scy scy mentioned this pull request Jul 15, 2024
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