wink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anuj Bhatia <>
Subject Incorrectly decoded form parameters
Date Fri, 23 May 2014 08:26:10 GMT
I have a problem receiving form parameters with '%' characters in the
value in my Wink based REST service. I think it's caused by a bug in
Wink and want to confirm.

The service method is annotated as below:

public abstract Response someMethod(@FormParam("someParam") String someParam);

The value being sent with the form post is '<response-param
name="100%-95%">1</response-param>'. The value is correctly encoded as
per the rules of 'application/x-www-form-urlencoded' in the HTTP
request body. However, the value actually received in the service code
is garbled - '<response-param name="100 5 1</response-param> '

The request is also processed by a servlet filter before being passed
on to the Wink code. This filter is checking for the presence of an
auth token and reads the request parameters from the request body.

If the filter is removed the 'someParam' value is correctly received
by the code in 'someMethod'. The problem also goes away if I add
@Encoded to the method.

I think this is a bug and I shouldn't have to use the @Encoded
annotation in this case. Also, see section 6.1 at [1].

Is my understanding on this correct? I can provide a test case if required.

[1] -

View raw message