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

Bugs that are actually features.
Post Reply
ritobanrc
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Sep 13, 2017 1:11 am
Contact:

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

Post 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

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

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

Post 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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

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

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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?
If you want to get ahold of me I'm almost always on Discord.

chrisgbk
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Mon Jan 02, 2017 4:31 am
Contact:

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

Post 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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.

chrisgbk
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Mon Jan 02, 2017 4:31 am
Contact:

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

Post 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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

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

Post 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.

Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

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

Post 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.

m44v
Fast Inserter
Fast Inserter
Posts: 122
Joined: Sun May 15, 2016 8:55 pm
Contact:

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

Post 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.



Post Reply

Return to “Not a bug”