Coder Social home page Coder Social logo

Comments (3)

joakime avatar joakime commented on July 22, 2024

Interestingly, its a URL encoding issue.

The URL that curseforge.com gives you is ...

https://media.forgecdn.net/files/2520/96/inventorysorter-1.12.2-1.13.1+55.jar

But the correct one (which does work) is ...

https://media.forgecdn.net/files/2520/96/inventorysorter-1.12.2-1.13.1%2B55.jar

(The + is correctly encoded to %2B)

Would recommend you don't use + in your filename.

from inventorysorter.

cpw avatar cpw commented on July 22, 2024

Why not? That is the correct way to encode + and it should be expected, since + is also a get parameter separator.

from inventorysorter.

joakime avatar joakime commented on July 22, 2024

Curseforge fixed this for you. 👍

It's now (3 days ago this wasn't true) encoding the filename during the final CDN redirect to correct the bad encoding.

$ wget --verbose https://minecraft.curseforge.com/projects/inventory-sorter/files/2520096/download
--2018-01-25 10:30:02--  https://minecraft.curseforge.com/projects/inventory-sorter/files/2520096/download
Resolving minecraft.curseforge.com (minecraft.curseforge.com)... 104.17.150.103, 104.17.151.103, 104.17.149.103, ...
Connecting to minecraft.curseforge.com (minecraft.curseforge.com)|104.17.150.103|:443... connected.
HTTP request sent, awaiting response... 307 Temporary Redirect
Location: https://addons.cursecdn.com/files/2520/96/inventorysorter-1.12.2-1.13.1+55.jar 

The above filename in Location: is what you have on your curseforge page.
The user agent requests this raw filename, with the literal + ...

[following]
--2018-01-25 10:30:03--  https://addons.cursecdn.com/files/2520/96/inventorysorter-1.12.2-1.13.1+55.jar
Resolving addons.cursecdn.com (addons.cursecdn.com)... 104.16.83.211, 104.16.81.211, 104.16.85.211, ...
Connecting to addons.cursecdn.com (addons.cursecdn.com)|104.16.83.211|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://media.forgecdn.net/files/2520/96/inventorysorter-1.12.2-1.13.1%2B55.jar 

Which curseforge.com now sees and fixes the encoding (using the %2B escaping) with the final 302 redirect to the forgeCDN.

Which allows the download to succeed on the next request to the file on the CDN.

[following]
--2018-01-25 10:30:03--  https://media.forgecdn.net/files/2520/96/inventorysorter-1.12.2-1.13.1%2B55.jar
Resolving media.forgecdn.net (media.forgecdn.net)... 52.85.202.147
Connecting to media.forgecdn.net (media.forgecdn.net)|52.85.202.147|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 46420 (45K) [application/octet-stream]
Saving to: ‘download’

download                         100%[==========================================================>]  45.33K  --.-KB/s    in 0.02s

2018-01-25 10:30:03 (2.49 MB/s) - ‘download’ saved [46420/46420]

from inventorysorter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.