misconfigured `servlet-root` leads to confusing state
还没有人认领这个 Issue。
评估
调研方向
使用文件根目录 "htdocs" 和 servlet 根目录 "." 重现该配置,然后跟踪报告行附近的 filesystem-map.rkt 循环以及链接的 Racket issue 5488。确定配置错误在哪里被吞掉,并考虑 Web 服务器如何提供清晰的响应,而不是通用的文件未找到页面。
由索引模型根据 Issue 内容生成。
描述
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! 😅
- 主要语言
- Racket
- 星标
- 100
- 派生
- 48
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
racket/web-server 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
racket/web-server#46 ·
-
难度 4/5 3-5 天 新手友好度 45/100
racket/web-server#140 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
racket/web-server#135 ·
-
难度 5/5 一周以上 新手友好度 35/100
racket/web-server#131 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
racket/web-server#127 ·
查看 racket/web-server 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 67/100
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
ash-project/spark#303 ·
-
ocr_data_to_elements() raises AttributeError when a layout element is a List可能已有人在做 @Eapp1e 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
Unstructured-IO/unstructured#4616 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
longbridge/gpui-kit#3712 ·
维护者通常 1 天内回复