RosHTTP
RosHTTP copied to clipboard
Escaped Questionmark in URI is not handled correctly
When a request is created from an URI containing an escaped ? the ? will still be interpreted as the start of a query string, e.g. HttpRequest("http://localhost/foo%3Fbar")
fails to access the right resource.
This is due to using java.net.URI to parse the URI and URI.getPath returning the path with (partially) escaped segments.
A workarround therefore is to use withPath: HttpRequest("http://localhost").withPath("/foo%3Fbar")
works as expected.
I guess getRawPath
needs to be used instead of getPath
. Maybe other calls need to similarly adapted, e.g., getRawQuery
instead of getQuery
?