I cannot find this explicitly, but it seems that you cannot send the escaped plus sign ("% 2B") as the value of the request argument if you use java.net.URI since the arg request is escaped.
new URI("http", null, "example.com", 80, "/foo", "a=%2b", null);
I tried a valid "+" character, but it is sent as is, so the server will interpret it as a space.
new URI("http", null, "example.com", 80, "/foo", "a=+", null);
So, I think you just need to do percent encoding of the keys and values of the arg request and use a URI constructor with one argument that won't slip away? Perhaps let the URI go out of the “path” because the rules are complex (for example, the “+” sign means a plus sign, not a space, when on the way):
new URI(new URI("http", null, "example.com", 80, "/foo", null, null).toASCIIString() + "?a=%2b");
, , URI, URI:
URI u = ...;
URI identical = new URI(u.getScheme(),
u.getUserInfo(),
u.getPath(), u.getQuery(),
u.getFragment());
, % 2b
URI u = new URI("http://example.com:80/foo?a=%2b");
URI identical = ...;
, , apache commons spring ?
PS: http://docs.oracle.com/javase/6/docs/api/java/net/URI.html URI, " ". "".