Hi, I am looking for users' comments on subject I've started also on cxf-dev forum: ------------------
JAX-RS specification 1.0 for "UriBuilder.build(Object... values)" says that "All '%' characters in the stringified values will be encoded." This note matches behavior or URLEncoder, since % must be encoded anyway. My problem is that for "UriBuilder.buildFromEncoded(Object... values)" spec says "All % characters in the stringified values that are not followed by two hexadecimal numbers will be encoded". My interpretation of spec authors' intention is that: passed values are already encoded e.g. non-encoded value "foo%bar" must be encoded to "foo%25bar" and passed here. However if there are any '%' not matching percent-with-two-hexes like second '%' in "foo%25bar%baz". Their encoding should be forced. I think then "foo%25bar%baz" should become "foo%25bar%25baz". If URLEncoder would be applied once more result would be different, both percent chars would be affected leading to "foo%2525bar%25baz". How should "buildFromEncoded()" behave when "foo+bar" is passed? If '%' char encoding is forced also '+' char should be, leading to "foo%2Bbar". I see behavior of "buildFromEncoded" as not aligned with URLEncode behavior. This "extra" safety rule is not necessary for me... but anyway, I believe implementation should follow spec :) cheers, andy. -- View this message in context: http://www.nabble.com/UriBuilder.buildFromEncoded%28%29-spec-interpretation-tp21634539p21634539.html Sent from the cxf-user mailing list archive at Nabble.com.
