users@jersey.java.net

[Jersey] Status 500 on invalid Content-Type / JERSEY-1223

From: Martin Eigenbrodt <martineigenbrodt_at_googlemail.com>
Date: Thu, 25 Jul 2013 15:18:46 +0200

Hi There,

I ask you to reopen the Ticket JERSEY-1223 (as I can't) because the Problem still exists:
Jersey answers 500/ internal server error to a Request with invalid Content Type.

From the Code I'd say the Problem lies within

org.glassfish.jersey.servlet.WebComponent#filterFormParameters
calling reqeust.getMediaType() which throws a ProcessingException that is never caught.

I suspect the existing UnitTest in ContentTypeTest#testInvalidContentTypeHeader does not find the error because it does run in a different environemnt using grizly and WebComponent#filterFormParameters is never called.

Please let me know if there is any workaround...

Regards,


Martin