Static files handler doesn't route /path/ to /path/index.html
See original GitHub issueActual behavior (the bug)
Static files config gets a 404 Not Found
for the root path /
and other paths ending in /
(e.g. /course/
), when an index.html
exists in the corresponding resource folder.
Video showing behavior change when i switch to my v5 branch: https://www.loom.com/share/bb60c18b18004333a2b5c7402e960a96
Branch being used in the video: https://github.com/A1Liu/schedge/pull/141
Expected behavior
I think I expected the static files config to behave the same as in v4, and respond with the resource at /next/index.html
when the user goes to http://localhost:4358/
To Reproduce I made another branch with much less code that still reproduces the error, without needing to do anything too fancy: https://github.com/A1Liu/schedge/pull/149
It’s a Gradle project, so it should be build-able using Gradle, and it runs on port 4358 . After building, you can run the fat-jar directly using
java -Xmx1G -Djdk.httpclient.allowRestrictedHeaders=host,connection \
-jar ./build/libs/schedge.jar serve
Additional context
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
This has been released as part of
5.1.1
Update: Definitely a bug (at the very least an inconsistency) on our side, when setting
staticFiles.precompress = false;
javalin serves the index.html file, I have a fix and will PR later.