-
Notifications
You must be signed in to change notification settings - Fork 192
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
@restJson1 and charset=utf8 in the header #3471
Comments
Looks like |
Actually, servers should accept this kind of requests. We recently identified this bug and it is being fixed in #3576. |
2 tasks
djedward
added a commit
to djedward/smithy-rs
that referenced
this issue
Apr 11, 2024
djedward
added a commit
to djedward/smithy-rs
that referenced
this issue
Jun 27, 2024
2 tasks
djedward
added a commit
to djedward/smithy-rs
that referenced
this issue
Jun 27, 2024
github-merge-queue bot
pushed a commit
that referenced
this issue
Jun 28, 2024
Fixes: #3471 ## Motivation and Context An issue was raised about a mobile client that appends "; charset=utf-8" to the Content-Type when using restJson1. The [latest RFC](https://www.rfc-editor.org/rfc/rfc8259) for "application/json" does not register a charset parameter, but indicates it is reasonable to accept it. ## Description This change loosens the validation of the expected content type to allow all parameters. ## Testing * Tests for each protocol were added to [smithy](smithy-lang/smithy#2296) * ran the runtime and codegen tests * Added test for rest-xml, as smithy-rs does not currently run the smithy tests. ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Probably a stupid question - I have a service defined with
@restJson1
. The incoming requests that have headerContent-Type: application/json
work fine.However if they carry header
Content-Type: application/json; charset=utf8
, the server just returns:Is there anyway to configure the header value matching somehow?
Thanks in advance.
The text was updated successfully, but these errors were encountered: