Skip to content

Return 404 Not Found for accessing file as directory pattern#1124

Closed
xKerman wants to merge 2 commits intoKludex:masterfrom
xKerman:fix/access-static-file-as-directory
Closed

Return 404 Not Found for accessing file as directory pattern#1124
xKerman wants to merge 2 commits intoKludex:masterfrom
xKerman:fix/access-static-file-as-directory

Conversation

@xKerman
Copy link

@xKerman xKerman commented Jan 11, 2021

fixes #1123

@xKerman
Copy link
Author

xKerman commented Jan 11, 2021

Hmm, it seems that test suite failure on python 3.8 is caused by pytest update.
On my machine, test passes after downgrading pytest from 6.2.1 to 6.1.2.

@xKerman xKerman marked this pull request as ready for review January 11, 2021 08:32
@JayH5
Copy link
Contributor

JayH5 commented Feb 2, 2021

This seems like a good change, but my first thought is wondering if there are other exceptions we should be catching too, e.g. PermissionError 🤔 or even a more general error like OSError. I'm not really sure, and if somebody could do some experimentation/research that'd be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

staticfiles Static file serving

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StaticFiles causes Internal Server Error when user accesses existing files as directory

2 participants