]> git.ipfire.org Git - thirdparty/starlette.git/commit
Send 404 instead of 500 when filename requested is too long on `StaticFiles` (#2583)
authorJeremy Epstein <jazepstein@gmail.com>
Sat, 1 Jun 2024 13:07:03 +0000 (23:07 +1000)
committerGitHub <noreply@github.com>
Sat, 1 Jun 2024 13:07:03 +0000 (13:07 +0000)
commit4f16aedc0f51e10fb466ece0fc6460ceec2034c8
treeb0a8b90c09e8a3c4291e6ac7520c2f7b471d1b90
parent2655893e7eafe2949f65a21f22c8a9be6b6abf58
Send 404 instead of 500 when filename requested is too long on `StaticFiles` (#2583)

* Make "Filename too long" return 404 not 500

* Simplify code source

* Correct comment

---------

Co-authored-by: Jeremy Epstein <jeremy.epstein@seertechsolutions.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
starlette/staticfiles.py
tests/test_staticfiles.py