-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix StaticFileHandler
to return 404 on file error
#16025
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
base: master
Are you sure you want to change the base?
Fix StaticFileHandler
to return 404 on file error
#16025
Conversation
I don't get why the new spec fails on Aarch64 CI and in the interpreter only. Aarch64 CI is the runs-on environment which uses a different base image than the hosted runners from GitHub. But interpreter specs should run in exactly the same environment as other jobs. 🤷 At last, I added a |
|
||
# FIXME: Setting permissions does not work on all systems. Even the | ||
# permissions recheck is not sufficient (see https://github.com/crystal-lang/crystal/pull/16025#issuecomment-3112225515). | ||
pending! if File.info("forbidden.txt").permissions.owner_read? || (File.read("forbidden.txt") rescue nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's only the interpreter, then maybe we can skip only when interpreted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the File.read
check, it seems good now.
Resolves #15901