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

Per RFC7694, if a Content-Encoding isn't recognized, reject with 415 Unsupported Media Type #5285

Closed
joakime opened this issue Sep 16, 2020 · 1 comment · Fixed by #5286
Closed
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@joakime
Copy link
Contributor

joakime commented Sep 16, 2020

Jetty version
9.4.31

Description
Per https://tools.ietf.org/html/rfc7694

If the Content-Encoding from the client isn't recognized, the server should reject the request with "415 Unsupported Media Type".

We currently reject Content-Encoding during HttpServletRequest.getParameter*() method calls with a "501 Unsupported Content-Encoding", which is incorrect.

https://github.com/eclipse/jetty.project/blob/ba22c08fde5362fe2e89e9c417d2a90658c74283/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java#L517-L519

We should return the proper status code "415 Unsupported Media Type" at least during the Request.getParameter*() method calls.

@joakime joakime added the Bug For general bugs on Jetty side label Sep 16, 2020
@joakime joakime self-assigned this Sep 16, 2020
joakime added a commit that referenced this issue Sep 16, 2020
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
joakime added a commit that referenced this issue Sep 16, 2020
+ Fixing unit test expectations

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
joakime added a commit that referenced this issue Sep 17, 2020
…d-media-type

Issue #5285 - Using Status code 415 Unsupported Media Type instead
@joakime
Copy link
Contributor Author

joakime commented Sep 17, 2020

PR #5286 merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant