-
Notifications
You must be signed in to change notification settings - Fork 422
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
[bugfix] Sending Accept-Charset causes 406 NotAcceptable response #3013
[bugfix] Sending Accept-Charset causes 406 NotAcceptable response #3013
Conversation
// mozilla says servers should ignore the Accept-Charset header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Charset | ||
val hasAcceptCharset = ctx.request.header(HeaderNames.AcceptCharset).nonEmpty | ||
|
||
if (hasMatchingRepresentation || hasAcceptCharset) endpointHandler.onDecodeSuccess(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this fix ignores the accept-charset header, it seems to bypass content negotiation when this header is present?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. It checks to see if we have that header and if we have, we move on. I didn't have any other idea about it, maybe a hint for better solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I have no idea, I would have to go and try to fix the issue myself ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, so I will think and try another solution ;)
Sorry but it most probably still is the wrong solution. You are filtering out accept-charset, but in a different place. The first thing that's lacking in the PR is a test, that would demonstrate the bug. Let's start with that, probably in |
…on in NotAcceptableInterceptor
1fa020a
to
ec944d9
Compare
No description provided.