Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escaped Questionmark in URI is not handled correctly #80

Open
dthoma opened this issue Jan 29, 2018 · 1 comment
Open

Escaped Questionmark in URI is not handled correctly #80

dthoma opened this issue Jan 29, 2018 · 1 comment

Comments

@dthoma
Copy link

dthoma commented Jan 29, 2018

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.

@sjrd
Copy link

sjrd commented Jan 30, 2018

I guess getRawPath needs to be used instead of getPath. Maybe other calls need to similarly adapted, e.g., getRawQuery instead of getQuery?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants