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

Akka rejects requests when UTF-8 charset is explicitly specified in Accept header along with `application/json` #1139

Closed
Leammas opened this Issue May 17, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@Leammas
Contributor

Leammas commented May 17, 2017

The problem occurred after updating to 10.0.6 from 10.0.5. I've made failing unit test here:
Leammas@194378e

According to iana the "charset" parameter should not affect compatibility.

The problem was introduced here but I'm not sure how to fix it without breaking new Accept-handling behavior

@jrudolph jrudolph added the 0 - new label May 17, 2017

@jrudolph

This comment has been minimized.

Show comment
Hide comment
@jrudolph

jrudolph May 17, 2017

Member

The behavior you describe is implemented when the charset parameter is offered using the Accept-Charset header. However, RFC 7231, section 5.3.2 explicitly mentions that charset is an allowed parameter to put into the Accept-header as well so arguably putting it there instead of using Accept-Charset should make no difference.

That means, we might need to treat the charset parameter in the Accept header specially. @raboof wdyt?

Member

jrudolph commented May 17, 2017

The behavior you describe is implemented when the charset parameter is offered using the Accept-Charset header. However, RFC 7231, section 5.3.2 explicitly mentions that charset is an allowed parameter to put into the Accept-header as well so arguably putting it there instead of using Accept-Charset should make no difference.

That means, we might need to treat the charset parameter in the Accept header specially. @raboof wdyt?

@jrudolph

This comment has been minimized.

Show comment
Hide comment
@jrudolph

jrudolph May 17, 2017

Member

Maybe we could improve the line at 4758a44#diff-95adf484e1280a1b0d76142e2901b916R98, to check a mediarange charset parameter against the charset given in the fixed charset mediatype?

Member

jrudolph commented May 17, 2017

Maybe we could improve the line at 4758a44#diff-95adf484e1280a1b0d76142e2901b916R98, to check a mediarange charset parameter against the charset given in the fixed charset mediatype?

@Leammas

This comment has been minimized.

Show comment
Hide comment
@Leammas

Leammas May 17, 2017

Contributor

Is the solution suggested in the PR #1140 acceptable?

Contributor

Leammas commented May 17, 2017

Is the solution suggested in the PR #1140 acceptable?

jrudolph added a commit that referenced this issue Jun 12, 2017

=htc #1139 Ignore `charset` param in `Accept` header during content n…
…egotiation (#1140)

Instead, clients should use `Accept-Charset` to negotiate the charset.

@jrudolph jrudolph added this to the 10.0.8 milestone Jun 12, 2017

@2m

This comment has been minimized.

Show comment
Hide comment
@2m

2m Jun 20, 2017

Member

Fixed in #1140

Member

2m commented Jun 20, 2017

Fixed in #1140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment