I use Jersey 1.12 and have an endpoint that may or may not receive invalid headers from clients that I do not control (for example, "Content-Type":"application/json; bla-bla" ). Obviously, bla-bla distorted, since spec requires that the parameters have values, namely bla-bla=value , and thus Jersey outputs something like
"status": 400, "message": "Bad Content-Type header value: 'application/json; bla-bla'"
I can write a filter to solve this problem, as suggested here , here and here , but I wonder if there is a way to get Jersey to just ignore the error header together in cases where I am not interested in its meaning?
source share