users@jersey.java.net

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

From: Martin Eigenbrodt <martineigenbrodt_at_googlemail.com>
Date: Fri, 26 Jul 2013 06:42:24 +0200

Great. Thanks a lot.

M.
On 25.07.2013, at 18:32, Michal Gajdos <michal.gajdos_at_oracle.com> wrote:

> Hi Martin,
>
> thanks for a detailed analysis. I've reopened the bug and working on a fix. Unfortunately there is no workaround for this particular case.
>
> Thanks,
> Michal
>
> On 25.07.2013 15:18 , Martin Eigenbrodt wrote:
>> 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
>>
>