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

Handle paths with a '?' in them #14

Merged
merged 1 commit into from
Feb 15, 2022

Conversation

stuartwdouglas
Copy link
Member

This is actually quite tricky, as URI does not let you create these by
default, you need to sneak them in using URL.toUrl(). If you attempt to
use the URI constructor directly then a '?' is interpreted as the start
of the query string, and %3f is encoded to %253f, so there is no way to
actually pass in an ecoded question mark to the URI constructor.

@Postremus
Copy link
Member

Postremus commented Feb 15, 2022

Out of curiosity, in what cases can a path pointing to a jar contain question marks? Any examples?

@stuartwdouglas
Copy link
Member Author

Just make a directory with a question mark in the name on Linux (won't work on windows).

@aloubyansky
Copy link
Member

Perhaps skip the test on Windows?

This is actually quite tricky, as URI does not let you create these by
default, you need to sneak them in using URL.toUrl(). If you attempt to
use the URI constructor directly then a '?' is interpreted as the start
of the query string, and %3f is encoded to %253f, so there is no way to
actually pass in an ecoded question mark to the URI constructor.
@stuartwdouglas
Copy link
Member Author

Oops, I already had that locally but just forgot to push it.

@aloubyansky aloubyansky merged commit bb9f681 into quarkusio:main Feb 15, 2022
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

Successfully merging this pull request may close these issues.

4 participants