Page 1 of 1

[Rseding91] Mod Portal Download use %20, Game Requires Spaces

Posted: Tue Jan 02, 2018 11:41 pm
by ritobanrc
When downloading a mod from the mod portal, it replaces the spaces with %20. However, when placed in the mods folder, the game crashes. Making it an actual space fixes the problem.

For example:
Download: Squeak%20Through_1.1.8.zip
What works in game: Squeak Through_1.1.8.zip

Re: Mod Portal Download use %20, Game Requires Spaces

Posted: Tue Jan 02, 2018 11:46 pm
by kovarex
I don't think that we should allow spaces in mod name.
It can be in the readable name, but the mod name should be without spaces.

Re: Mod Portal Download use %20, Game Requires Spaces

Posted: Tue Jan 02, 2018 11:48 pm
by Bilka
kovarex wrote:I don't think that we should allow spaces in mod name.
It can be in the readable name, but the mod name should be without spaces.
Bit too late for that now, isn't it? https://mods.factorio.com/mods/Raeon for example has spaces in all mod names, they would have to reupload all their mods, and couldn't even migrate between versions due to the name change.

Re: [Rseding91] Mod Portal Download use %20, Game Requires Spaces

Posted: Wed Jan 03, 2018 12:33 am
by Rseding91
ritobanrc wrote:When downloading a mod from the mod portal, it replaces the spaces with %20. However, when placed in the mods folder, the game crashes. Making it an actual space fixes the problem.

For example:
Download: Squeak%20Through_1.1.8.zip
What works in game: Squeak Through_1.1.8.zip
Thanks for the report however I can't reproduce what you're saying: when I download squeak through off the mod portal it downloads as "Squeak Through_1.1.8.zip" and if I manually rename it to include %20 instead of the space it gives a proper error about the name being miss-matched.

What browser are you using?

Re: [Rseding91] Mod Portal Download use %20, Game Requires Spaces

Posted: Wed Jan 03, 2018 1:05 am
by chrisgbk
Rseding91 wrote:
ritobanrc wrote:When downloading a mod from the mod portal, it replaces the spaces with %20. However, when placed in the mods folder, the game crashes. Making it an actual space fixes the problem.

For example:
Download: Squeak%20Through_1.1.8.zip
What works in game: Squeak Through_1.1.8.zip
Thanks for the report however I can't reproduce what you're saying: when I download squeak through off the mod portal it downloads as "Squeak Through_1.1.8.zip" and if I manually rename it to include %20 instead of the space it gives a proper error about the name being miss-matched.

What browser are you using?
Image
Image
I can confirm the behaviour on Firefox Quantum 57.0.3, but since the link on the mod portal has a space in it and the %20 is the browsers doing, I'd say this is outside of your control, other than making a policy decision to not allow spaces.

Re: [Rseding91] Mod Portal Download use %20, Game Requires Spaces

Posted: Wed Jan 03, 2018 1:10 am
by Rseding91
I see, in that case you'll need to file a bug report with the FireFox devs to have them fix the issue on their end.

Re: [Rseding91] Mod Portal Download use %20, Game Requires Spaces

Posted: Wed Jan 03, 2018 1:37 am
by chrisgbk
Rseding91 wrote:I see, in that case you'll need to file a bug report with the FireFox devs to have them fix the issue on their end.
I double checked RFC 3986; space is not in the allowed characters set of a URI/URL and must be %encoded, so technically the mod portal is deviating from standard by supplying a link with an unencoded space. Since it's not standard, that's why there is variability in how different browsers handle the situation. See also this stack overflow question/answer.

Re: [Rseding91] Mod Portal Download use %20, Game Requires Spaces

Posted: Wed Jan 03, 2018 2:14 am
by Rseding91
chrisgbk wrote:
Rseding91 wrote:I see, in that case you'll need to file a bug report with the FireFox devs to have them fix the issue on their end.
I double checked RFC 3986; space is not in the allowed characters set of a URI/URL and must be %encoded, so technically the mod portal is deviating from standard by supplying a link with an unencoded space. Since it's not standard, that's why there is variability in how different browsers handle the situation. See also this stack overflow question/answer.
To be honest, I don't really care what the RFC says. The link you provided says it was written in 2005 which means it's super outdated. If a browser can't handle a simple file download without mangling the file name that's the browsers problem. Chrome, IE and Edge handle the downloads without any issues. Additionally the in-game downloader has no such issues.

Re: [Rseding91] Mod Portal Download use %20, Game Requires Spaces

Posted: Wed Jan 03, 2018 3:06 am
by Zavian
The download attribute takes an optional filename value which specifies the filename to use when saving. https://www.w3schools.com/tags/att_a_download.asp .

No idea whether mods.factorio.com is specifying it.

Re: [Rseding91] Mod Portal Download use %20, Game Requires Spaces

Posted: Mon Jan 15, 2018 11:38 pm
by Supercheese
Oh, so this is a browser error, I see.

Worth noting is that for quite a long while, this error did not exist, and the mod portal happily provided the proper filenames when downloading in Firefox. However, now Firefox is having issues with naming... so perhaps something in the new Firefox 57 has changed the way it handles the interaction with the mod portal.

Re: [Rseding91] Mod Portal Download use %20, Game Requires Spaces

Posted: Tue Jan 16, 2018 3:30 am
by m44v
Rseding91 wrote:The link you provided says it was written in 2005 which means it's super outdated.
Is not, RFC3986 the is current one, otherwise there would be a "Obsoleted by: number" somewhere at the top.
If a browser can't handle a simple file download without mangling the file name that's the browsers problem. Chrome, IE and Edge handle the downloads without any issues. Additionally the in-game downloader has no such issues.
It might be a case of Firefox adhering to the spec to the letter while other browsers are more forgiving to non-conformant websites.
Rseding91 wrote:I see, in that case you'll need to file a bug report with the FireFox devs to have them fix the issue on their end.
The download link isn't public, you need an account, correct? then a bug report wouldn't be useful. If there's a download with a space that works for anyone then I can submit a bug report.

Re: [Rseding91] Mod Portal Download use %20, Game Requires Spaces

Posted: Wed Jan 17, 2018 9:56 pm
by Supercheese
Seems to be fixed! :)

Re: [Rseding91] Mod Portal Download use %20, Game Requires Spaces

Posted: Fri Jan 19, 2018 1:15 am
by Supercheese
Farewell-sweet-whitespace
It-was-fun-while-it-lasted
Now-only-dashes