I am a bit confused.

If you pass

"%25D1%2582" and have @Encoded then you will have
"%25D1%2582" made available to the service.

Sergey
On 03/03/16 18:09, Volkov Sergey wrote:
So currently there no way to pass both Cyrillic "т" as "т" (coded as
"%D1%82" in url ) and "%D1%82" as "%D1%82" (coded as "%25D1%2582") from
client to server using proxy?
Should I create issue about that?

2016-03-03 20:52 GMT+03:00 Sergey Volkov <ser...@yandex-team.ru>:

if you use Http centric API then indeed you can have @Encode
on service interfaces but pass %D1%82 directly to 2.0 Client API or
WebClient.

If you have a proxy: it actually does not do @Encode processing either -
the reason is that it is irrelevant for the proxy, it uses
UriBuilder.buildFromEncoded() and must make sure the URI is correctly
built. If it sees %-encoded values it does not touch them, otherwise it
will encode them if needed. @Encoded is really for the server - as the
processing requirements may require the value being either decoded or
encoded.

So adding @Encoded to the interface should do it...

Sergey
On 03/03/16 15:43, Volkov Sergey wrote:

Hi!

There was issue https://issues.apache.org/jira/browse/CXF-6122 that +
was
not working in QueryParam

I have quite similar issue - but I can't pass percent encoded string in
query params:

When I pass string "т" (Cyrillic symbol) to generated client in encodes
to
"%D1%82" in url and decodes as "т" on server what is fine, but when i
pass
"%D1%82" rather then "%25D1%2582" in encodes also to "%D1%82" and
decodes
also to "т".
As far as I see this happens because
org.apache.cxf.jaxrs.utils.HttpUtils#encodePartiallyEncoded don't encode
characters that looks like percent encoded.

Is it bug?

Is there any way to transfer %D1%82 trough @QueryParam?
There is annotation javax.ws.rs.Encoded which as said in javadoc prevent
@QueryParams from encoding, but with in that case I have to encode it
manually in all places where generated method is used.




--
Сергей Волков
serg-v@





--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Reply via email to