-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permission issue when uploading brotli compressed files. #1625
Comments
https://github.com/itchio/zipserver/blob/master/zipserver/archive.go#L326
The 403 error is a catch all for file doesn't exist at that path: https://itch.io/docs/creators/html5#common-pitfalls This means you are trying to request a file by name that is not included in your archive. if you have a brotli encoded file with the path Note that uploading a pre-compressed brotli file without the If you upload a brotli compressed file without the extension |
After trying again it found out that it's not the issue, it does recognize the suffix and remove it, however there seems to be a permission issue. I uploaded the same game one with brotli compression and the other without. https://html-classic.itch.zone/html/10867486/mygame/mygame.wasm <Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
<Details>Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist).</Details>
</Error> https://html-classic.itch.zone/html/10867446/mygame/mygame.wasm |
Sorry, I typed the wrong information. The Note that a 403 error is a catch all for file doesn't exist at that path: https://itch.io/docs/creators/html5#common-pitfalls |
Thanks this does seem to work, but shouldn't the .br be removed? Correct me if i'm mistaken but normally when brotli is setup in server to compress on the fly that extension isn't added. It only compress the file and set contentencoding to "br". Precompressing it would give better compression and avoid processing from itch servers but should work as if it's on the fly ( Requesting game.wasm would send game.wasm that was uploaded as game.wasm.br but only add contentencoding="br" Is there a usecase for how it's setup right now? |
@leafo The documentation you linked to states the br extension is removed. Quote from https://itch.io/docs/creators/html5#compression emphasis mine:
I think not removing the extension is a bug. The |
It's confusingly worded but not incorrect: the mime-type detection works on the filename after the
We serve files directly from a CDN pointing to a storage bucket, there is no server side logic for content-encoding negotiation going on. Additionally, even for people who set up their own host to serve files, dealing with pre-compressed files is not a trivial configuration (mostly because the brotli stream does not have anything in it that suggests it is brotli encoded, and the filesystem doesn't have any metadata about the content encoding, hence the I also want to note that if you check https://itch.io/docs/creators/html5#compression/compressed-file-types you can see that we transparently apply gzip compression through the CDN to bare |
There is an action here. You should remove the section quoted below from the documentation as it is implementation detail that is not visible to users.
|
It is relevant because that is how the content-type header is set: mime-type detection via the extension of the file |
Its seems there is a misunderstanding somewhere. I have some clariify questions:
|
I believe all these questions have been answered already in this thread but I'll recap:
|
I have a godot web game that i wanted to precompress with brotli (50mb -> 7mb).
I found in the documentation that itch works with brotli but when i try the game i get a lot of 404 back.
My folder structure is:
The game works when it's not ending with .br but send a 403 Forbidden when it does.
The text was updated successfully, but these errors were encountered: