Anemone3DS icon indicating copy to clipboard operation
Anemone3DS copied to clipboard

ZIP not found at this URL

Open flleeppyy opened this issue 1 year ago • 1 comments

Description When scanning a QR code that goes to a zip file that's not from Themeplaza, it fails with "ZIP not found at this URL, if you believe this is an error, please contact the site administrator"

Steps to reproduce

I uploaded a modified custom splash to my file share and I made a QR code for it but when I scan it with a 3DS, it doesn't work and gives the above error. http://safe.fleepy.tv/files/v0rylZWB.zip

I believe the problem is the Content-Type header. My web server, and various other IIS web servers, will respond with application/x-zip-compressed instead of just application/zip

C:\Users\Chen>curl https://safe.fleepy.tv/files/v0rylZWB.zip -i
HTTP/1.1 200 OK
Date: Mon, 24 Apr 2023 04:19:25 GMT
Content-Type: application/x-zip-compressed
(stripped rest of content)

C:\Users\Chen>curl https://themeplaza.art/download/54828 -i
HTTP/1.1 200 OK
Server: nginx/1.18.0
Date: Mon, 24 Apr 2023 04:19:42 GMT
Content-Type: application/zip

The basic fix is to just add ; application/x-zip-compressed to the acceptable_mime_types when calling http_get here https://github.com/astronautlevel2/Anemone3DS/blob/adccc70cca848a0e4362676512cfae56b5256e83/source/camera.c#L336

I don't want to make a pull request because I don't have the tools installed to build the project and see if it would even work, but someone who works on this project probably knows better than me.

System information System model new3DS XL

System firmware version 11.16.0-49U

Anemone3DS version v2.3.1

Luma3DS version v12.0.1

flleeppyy avatar Apr 24 '23 05:04 flleeppyy

That will be part of the problem, but the app also doesn't support anything higher than TLSv1.1 (if memory serves). You may need to consider that as part of fixing this. The way we deal with this now is by using HTTP-only to serve downloads to Anemone.

Helloman892 avatar Apr 25 '23 21:04 Helloman892

Added x-zip-compressed as an acceptable mime type since that's what Windows seems to default to when uploading zip files. The newer TLS versions issue is still and issue but not one that's in the scope of this ticket (and - frankly - not one I'm sure I plan on fixing).

astronautlevel2 avatar Apr 24 '24 18:04 astronautlevel2