Hello.
There is a couple of small problems with x-www-form-urlencoded requests in
CXF 3.1.0.
CXF doesn't make any difference between query and form parameters if
request content type is "application/x-www-form-urlencoded".
My service looks like this
@POST
@Path(/signin)
@Consumes("application/x-www-form-urlencoded")
public Details signIn(
@FormParam("login") String login,
@FormParam("password") String password) {
...
}
and it can be invoked by two kinds of requests:
1) with "application/x-www-form-urlencoded" content type and form
paramaters in request body (as expected)
2) with "application/x-www-form-urlencoded" content type and URL parameters
(/signin?login=...&password=...)
So if you use URL parameters instead of Form the service still responds.
I'm not sure that it is a bug, but it's kind of unexpected behavior for me.
Or maybe I did something wrong.
In this two cases the parameters are brought from request.parameterMap.
This field contains both query and form parameters.
(see org.apache.cxf.jaxrs.utils.FormUtils : method
populateMapFromString(..., javax.servlet.http.HttpServletRequest request))
There is also a minor problem with logging: LoggingInInterceptor (and
LoggingOutInterceptor too) doesn't log any data about form parameters of a
request. This parameters are valuable so it can cause some inconvenience.
Thanks
--
Valeria Golovina