curiousdannii / parchment

The Interactive Fiction web app
https://iplayif.com
MIT License
421 stars 60 forks source link

HTTP 302 redirects not being handled #122

Closed DavidKinder closed 2 years ago

DavidKinder commented 2 years ago

IFDB's page for Counterfeit Monkey gives the "Play On-line" link as

https://iplayif.com/?story=https%3A%2F%2Fgithub.com%2Fi7%2Fcounterfeit-monkey%2Freleases%2Fdownload%2Fr10%2FCounterfeitMonkey-10.gblorb

But this doesn't work, at least not for me: with Firefox I get "TypeError: NetworkError when attempting to fetch resource." and with Edge "TypeError: Failed to fetch". The actual link to the Blorb file, https://github.com/i7/counterfeit-monkey/releases/download/r10/CounterfeitMonkey-10.gblorb, works fine in these browsers. However, looking in more detail with wget, accessing this URL returns a HTTP 302 redirect to a URL under "githubusercontent.com". Parchment doesn't seem to be handling that.

curiousdannii commented 2 years ago

Huh, we'd already patch it to follow redirects, so I don't know why it's buggy now. Will investigate.

curiousdannii commented 2 years ago

Can't reproduce in Firefox 98, Edge 100, or Chrome 99 on Windows. And even if the original fetch fails, it should then use the proxy which should be fine with all number of weird redirects.

DavidKinder commented 2 years ago

I've now gone round and tested all the computers here (all Windows boxes) - it works on two, and it fails on two. Not clear at all why. I won't complain if you close this issue as I don't know when I'll get a chance to see if I can figure out why this might be happening for me.

namekuseijin commented 2 years ago

Link is working fine on Android chrome.

Em ter, 5 de abr de 2022 05:17, David Kinder @.***> escreveu:

IFDB's page for Counterfeit Monkey gives the "Play On-line" link as

https://iplayif.com/?story=https%3A%2F%2Fgithub.com%2Fi7%2Fcounterfeit-monkey%2Freleases%2Fdownload%2Fr10%2FCounterfeitMonkey-10.gblorb

But this doesn't work, at least not for me: with Firefox I get "TypeError: NetworkError when attempting to fetch resource." and with Edge "TypeError: Failed to fetch". The actual link to the Blorb file, https://github.com/i7/counterfeit-monkey/releases/download/r10/CounterfeitMonkey-10.gblorb, works fine in these browsers. However, looking in more detail with wget, accessing this URL returns a HTTP 302 redirect to a URL under " githubusercontent.com". Parchment doesn't seem to be handling that.

— Reply to this email directly, view it on GitHub https://github.com/curiousdannii/parchment/issues/122, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVQEW2A7JISTGXNZE7OLBTVDPZH3ANCNFSM5SR5TOLA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

curiousdannii commented 2 years ago

Okay I'll close for now. If it happens again in a reproducible way we can reopen.