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

URL.toString() does not produce parseable (by java.URI) URL #76

Open
dietervdw-spotify opened this issue Sep 19, 2019 · 1 comment
Open

Comments

@dietervdw-spotify
Copy link

dietervdw-spotify commented Sep 19, 2019

Example of problematic url:

http://s3.eu-central-1.amazonaws.com/dienettenumdieecke.de/Episoden/%23001%20Die%20Truman%20Show.mp3?ptm_source=feed&ptm_context=&ptm_request=38d83f1a6887&ptm_file=#001 Die Truman Show.mp3

(Note the space in the end that is part of the last query parameter.)

I tried using your library to clean up this URL before feeding it to URI in order to prevent it crashing the parsing in URI, but unfortunately that doesn't work. It still produces a URL that is not parseable by the URI class.

In good news, calling toJavaURI() and then doing toString()seems to work!

(I know the conversion URI -> String -> URI sounds stupid, but for reasons I need an URI to feed in a library.)

@deansg
Copy link

deansg commented Jun 3, 2020

Agree, another example is any url containing a pipe character ("|") in it's path string, which isn't properly escaped.

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