dev@jersey.java.net

Invalid media type

From: Fred <frederic.auguste_at_gmail.com>
Date: Thu, 26 Jul 2007 20:14:53 +0200

Hi,

I am working with jersey 0.2.

I defined a resource with these anotations :
    @HttpMethod("POST")
    @UriTemplate("/{version}/{toto}")
    @ConsumeMime("multipart/form-data")
    @ProduceMime("application/atom+xml")


When I send a request with the following content-type in my request header
Content-Type: multipart/form-data; boundary=Thread:0000_at_Round:0001
I have the following error :
java.lang.IllegalArgumentException: Invalid media type: multipart/form-data;
boundary=Thread:0000_at_Round:0001

If I use the following content-type in the header, the response is correct.
Content-Type: multipart/form-data;
boundary=GbSqW2a9GNsRqKSfkfYTN346mgofBgm0uUa4_slb

Is my content type is wrong or is it a bug in jersey ?

Thanks for your response.

Best regards,
Frédéric