Launcher
Launcher copied to clipboard
Have Launcher/Creator Tools/Etc handle URLs with spaces and other uncommon names correctly
I've noticed that trying to download mods with spaces or other symbols in the name result the client to error out.
Examples: Botania r1.10-352.jar Pam's HarvestCraft 1.12.2a.jar BiblioCraft[v2.4.3][MC1.12.0].jar The Beneath-1.12.2-1.3.0.jar CreativeCore v1.9.12 mc1.12.2.jar OnlinePicFrame v1.4.14 mc1.12.2.jar
Out of all my mods that download from curse, these 6 fail with
java.io.IOException: Did not get expected response code, got 404 for https://addons-origin.cursecdn.com
at com.skcraft.launcher.util.HttpRequest.expectResponseCode(HttpRequest.java:169)
at com.skcraft.launcher.install.HttpDownloader$HttpDownloadJob.download(HttpDownloader.java:252)
at com.skcraft.launcher.install.HttpDownloader$HttpDownloadJob.download(HttpDownloader.java:229)
at com.skcraft.launcher.install.HttpDownloader$HttpDownloadJob.run(HttpDownloader.java:202)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ultimately if every Modder followed a set naming rule that removed spaces and symbols like [ | ] etc we wouldn't have any issues like this.
They work in a normal web browser but the client just seems to dislike the urls.
URLs can only be sent over the Internet using the ASCII character-set.
Many of modern days browsers step in and convert unsafe ASCII characters automatically - that is why they work in normal browsers.
For example the last one (OnlinePicFrame) URL becomes https://addons-origin.cursecdn.com/files/2500/607/OnlinePicFrame%20v1.4.14%20mc1.12.2.jar once URL encoded correctly.
@spannerman79 yeah I figured but we have the correct/safe url inputted into the url.txt but the launcher fails to download still. Any ideas why?
--2017-12-13 08:43:51-- https://addons-origin.cursecdn.com/files/2500/607/OnlinePicFrame%20v1.4.14%20mc1.12.2.jar
Resolving addons-origin.cursecdn.com (addons-origin.cursecdn.com)... 54.230.133.101
Connecting to addons-origin.cursecdn.com (addons-origin.cursecdn.com)|54.230.133.101|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 75639 (74K) [application/java-archive]
Saving to: ‘OnlinePicFrame v1.4.14 mc1.12.2.jar’
OnlinePicFrame v1.4.14 100%[=================================>] 73.87K --.-KB/s in 0.006s
2017-12-13 08:43:52 (12.6 MB/s) - ‘OnlinePicFrame v1.4.14 mc1.12.2.jar’ saved [75639/75639]
That is the output of wget on my end - so the "unknown response" that is listed in your error needs to be found out yourself. I cannot do it as I get a http response of 200.
I'll check it out tonight if I don't forget.
@sk89q @spannerman79 Thank you both, I appreciate it. I'll keep an eye out for a reply. 😄
Another "launcher" has pointed out that the Curse platform does not use valid URLs according to RFC 3986, section 2.1 by including spaces and UTF-8 characters without percent encoding them.
So this is in fact a Curse issue (technically mod devs for the stupid as f* file naming as well as Curse for letting them get away with it)
Another example: Round-Trees-5.0-§31.16.2-§o.zip
If I leave it as-is in url.txt, curse naturally complains about the non-ASCII characters in the URL with HTTP400. But if I try to escape the §'s myself, then my %'s get escaped, and 404s ensue.
So whatever is trying to url-escape the contents of url.txt files isn't doing it right (eg. it escapes % but not §). I don't think it's an issue with Curseforge using "wrong" URLs, or mod devs using "wrong" filenames.
I think the problems on Curse's side that previously caused this issue have been cleaned up, and now there's a persistent issue on our side.