In the former case it it has no characters that can be used to form the
hex %-encoded representations.
The bottom line is, you should not expect the runtime auto-encode '%'
given that this symbol plays a special role in having correct URIs being
created.
If CXF will try to me over-smart then the next day someone will report
that it started producing
"100%25BETTER VALID STRING"
instead of
"100%BETTER VALID STRING"
Sergey
On 04/03/16 07:43, Volkov Sergey wrote:
Looks like POST request and @FormParam could be used, but I think this
behavior of @QueryParam may lead to tricky bugs in many places where it used
2016-03-04 10:37 GMT+03:00 Volkov Sergey <sergey.volko...@gmail.com>:
Yes, I don't understand why it does not touch this sequences.
It's a bit strange because I can successfully transfer "100%VALID STRING"
but not "100%BETTER VALID STRING"
Both this string not percent encoded, but second contains %BE which just
looks like percent encoded.
If instead of org.apache.cxf.jaxrs.utils.HttpUtils#encodePartiallyEncoded
cxf just urlencode parameter value when building query string both examples
would be transferred correctly.
If you are saying that
when you pass something like "%D1%82", or to make it clearer,
"%D1" and expect CXF do "%25D1", then no, it won't work.
UriBuilder does not touch percent-encoded sequences %XX.
May be try building the query with UriBuilder before passing it to the
proxy, something like
UriBuilder.fromUri("{a}%D21").build("%").toString()
Though not sure it will be cheaper.
Sergey
On 03/03/16 21:27, Sergey Beryozkin wrote:
From the original post in this thread:
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 "т".
I honestly don't get what the problem is. You pass a Cyrillic symbol
either as is or already percent encoded and in both case, as you say
above, you get this Cyrillic symbol.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/