misconfigured `servlet-root` leads to confusing state
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Reproduce the configuration using file-root "htdocs" and servlet-root ".", then trace the filesystem-map.rkt loop around the reported line and the linked Racket issue 5488. Determine where the misconfiguration is swallowed, and consider how the web server can provide a clear response instead of the generic file-not-found page.
Written by the indexing model from the issue text.
Description
I am trying to move an old use of the web server (from version 3.99 approx) to the new web server library and it has a configuration table that gets used via configuration-table->sexpr. In that configuration, file-root is set to "htdocs" and servlet-root is set to ".", but in the actual file system, the servlets are in the directory that contains "htdocs". That is, the correct configuration should have been setting servlet-root to ".." (or moving the servlets I suppose).
The problem, however, is that this configuration did not result an a sensible error message or even any error message. Instead, what happens is that an attempt to run the servlets results in a web page that says “The file you were looking for was not found on this server.”. This seems to be happening because there are some error-swallowing handlers that are pretty misleading. The real troublesome one seems to be the one in this loop that causes the web server to iterate through all of the path components of the url and eventually terminate due to this error.
I'm not sure of the best approach to dealing with this, but some thought towards a better response from the webserver to a similar kind of misconfiguration would be much appreciated. It doesn't have to be anything particularly sophisticated but tracing through what happened in the code to understand my misconfiguration was not a nice experience! 😅
- Dominant language
- Racket
- Stars
- 100
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from racket/web-server
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
racket/web-server#46 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
racket/web-server#140 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
racket/web-server#135 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
racket/web-server#131 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
racket/web-server#127 ·
All issues in racket/web-server
Similar issues
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:session-state issue-rating: 🌊 off-meta tidepool P2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openclaw/openclaw#165245 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
bug(hub,chat): Wave-2 web chat sendAgentRouted does not update RecordChannel reply affinity to 'web'Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
GoogleCloudPlatform/scion#2448 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
paperclipai/paperclip#15145 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
diegosouzapw/OmniRoute#15531 ·
Maintainers usually reply within 2 days
-
area:frontend bug FE P3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
klasolsson81/jobbliggaren#2010 ·
Maintainers usually reply within 1 day