users@jersey.java.net

[Jersey] Re: 415 Response unless adding @Consumes("application/x-www-form-urlencoded")

From: Adam Lindenthal <adam.lindenthal_at_oracle.com>
Date: Thu, 3 Sep 2015 18:28:38 +0200

Hi Reto,

it seems like you are experiencing the same issue as the reporter of https://java.net/jira/browse/JERSEY-2845 <https://java.net/jira/browse/JERSEY-2845> a while ago.
I tried the described behaviour and did not reproduce it. After a while, it turned out, that the problem was somewhere else on the reporter’s side.

Could you give it a look in JIRA and and check, that you are not in similar situation?

Regards,
Adam

> On 03 Sep 2015, at 18:17, Reto Gmür <reto_at_gmuer.ch> wrote:
>
> Hello,
>
> After updating to jersey 2.21 I'm getting 415 responses when submitting forms unless I add a @Consumes("application/x-www-form-urlencoded"). I'm using a method with @FormParam annotations.
>
> According to the spec the absence of a @Consumes-Annotation support for any media type (“*/*”) is assumed. How comes Jersey is returning a 415 response without this annotation?
>
> Cheers,
> Reto
>
>