httpbuilder
httpbuilder copied to clipboard
Incorrect encoding of "+" in the query part
When using RESTClient.get(...) it doesn't handle strings containing a + sign properly in query param. I have tracked it back to https://github.com/jgritman/httpbuilder/blob/master/src/main/java/groovyx/net/http/URIBuilder.java#L219 where for some reason it doesn't encode the "+" which it should.
Apache URIUtil has three method for this: encodeWithinQuery, encodeWithinAuthority, encodeWithinPath
URIUtil.encodeWithinQuery("+")
returns "%2B"