users@jersey.java.net

PostReplaceFilter does not get parameters from body

From: Ferdy Nagy <ferdy.nagy_at_pobox.com>
Date: Thu, 11 Dec 2008 18:35:59 -0800

Hi,

I'm using a PostReplaceFilter so that a caller can GET a resource via a POST
operation, which works fine; however parameters sent in the body with
content-type: application/x-www-form-encoded are not available, they're
always empty in the parameter map. It works if the parameters are included
in the query string.

I want to be able to pass a potentially long set of parameters when GETing
the resouce and they need to be encoded in the body. Looking through the
list it seems that this might be caused by the filter reading the stream
before the parameters are parsed from the body as Jersey reads the stream to
build up the parameter set not the ServletRequest?

Is there anyway I can change the PostReplaceFilter so that the parameters in
the body are parsed into the UriInfo object? I tried adding a @Consumes to
the @Get method but that does not seem to work, and I didn't really want to
do that anyway as the @Get should in theory consume, or not, anything.

thanks
- Ferdy