eclipse-ee4j / eclipse-ee4j/jersey

Empty Content-type results in request not going through Filters

Open
#3,932 4 comments 0 reactions 0 assignees View on GitHub
jax-rs
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

Hello,

I have filed this issue first to https://github.com/eclipse/jetty.project/issues/2883 thinking it was Jetty's behaviour.

Context :
I'm using Jersey 2 and Jackson to develop a web service on Jetty.
A POST request with an empty Content-type results in a 400 Bad Request response in Jetty without the request going through Request filters.

Issue :
The problem is that I would like to edit the response body but I can't find a way to handle this kind of Exceptions using ExceptionMapper. It seems that the request does not go through Filters nor caught by a generic ExceptionMapper class.

A full demo project (including a test case) can be found at https://github.com/joakime/jetty-issue-2883-jersey-empty-content-type

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.