Closed zachdeibert closed 5 years ago
This also fixes #41, #37, #35, and #34 .
Actually, spaces in the URLs are still broken.
There we go, now it works. :)
@Vazkii any chance we can get this merged? Most modpacks fail to download because of this issue.
This does not fix the issue. There are still some mods that fail due to encoding (try downloading any pack that contains Better Builder's Wands, like Sevtech Ages).
The root problem is that encoding is being forced when it shouldn't be, and there is an easier way to solve that. The URI(String) constructor does not encode and will throw a URISyntaxException if the string isn't valid, so just try that first then only encode if it fails. See here.
I would submit a pull request but there doesn't seem to be much activity here lately...
So, in case it's useful to anyone, I have uploaded a fat jar build containing this fix here.
This fixes issue #45 .