users@jersey.java.net

Re: [Jersey] POST is not working when body is provided

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 23 Jun 2009 09:27:42 +0200

On Jun 23, 2009, at 7:48 AM, Markus Karg wrote:

> Paul,
>
> it is rather strange. When using CONTENT_TYPE instead of ACCEPT then
> POST is working well (thank you for this tip!). So it seems, PUT and
> POST *are* handled differently in Jersey 1.0.3, even if you don't
> intended it.
>

They are not, unless some imp change the code while my back was
turned :-)

I am reasonably confident the behavior you are observing comes from
either:

   1) the client was using different request headers for PUT and POST;
or

   2) what the server was using different @Consumes for PUT and POST.

I suspect in your case it was the former.

If you still think something odd is going on i suggest you create a
simple reproducible case and I will eat a big portion of humble pie :-)

Paul.