http_static: a prefix with a trailing slash matches no file, and nothing says so
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
src/ext_http.c のルートチェックから始めます。ここでは、登録されたプレフィックスの直後のバイトが / であるか、パスの終端である必要があります。単一の http_static of ["/s1/", "files"] 登録と、/s1/a.txt への GET で再現します。結果は 404 になるはずです。issue が認めている 2 つの結果のうち、末尾スラッシュ付きの形式に合わせるか、登録時に拒否するかのいずれかを選び、その選択を docs/BUILTINS.md に記録してください。完了の条件は、両方の書き方を、サーバーを起動してファイルを取得するテストでカバーすることです。
索引モデルが issue の本文から書いたものです。
説明
Found by a consumer's HTTP server at 54008422.
What happens
http_static of [prefix, dir] serves the files of dir under prefix. A prefix written with a trailing slash matches no file. With files/a.txt present:
http_static of ["/s1/", "files"]
http_serve of 3000
GET /s1/a.txt answers 404 ({"error": "not_found"}). The same program with the prefix "/s1" answers 200. The route check in src/ext_http.c asks that the byte after the whole prefix be / or the end of the path, and after /s1/ the next byte is the file's first letter.
Why it matters
Both spellings are common, nothing is printed at registration, and the 404 is the same one an unknown path gets. A page that loads its script from such a prefix simply has no script.
Done when
http_staticwith a trailing slash on the prefix serves the same files as without it, or refuses the prefix at registration with an error that names it.docs/BUILTINS.mdsays which form the prefix takes.- A test starts one server for each spelling and fetches a file under it.
Corrected 2026-11-12. The first text of this issue registered both spellings in one program and read the 404 for /s1/ there. That program cannot show it: a second http_static replaces the first (#2357), so /s1/ would have answered 404 with or without its slash. The single registration above was run afterwards and answers 404 as described.
- 主要言語
- C
- スター
- 3
- フォーク
- 7
- 平均マージ
- 3時間 30分
- マージ済み PR(30日)
- 264
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InauguralSystems/EigenScript のほかの issue
-
http_fetch tests: the two no-child rows fail, not skip, where a task's children file does not exist対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea:http kind:gate-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
InauguralSystems/EigenScript#2397 ·
メンテナーはふだん 1 日以内に返信
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordオープンarea:http kind:silent-wrong
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
InauguralSystems/EigenScript#2394 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:docs good first issue kind:docs-drift
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
InauguralSystems/EigenScript#2360 ·
メンテナーはふだん 1 日以内に返信
-
area:stdlib kind:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
InauguralSystems/EigenScript#2355 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
InauguralSystems/EigenScript#2335 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
InauguralSystems/EigenScript の issue をすべて見る
似ている issue
-
Add SECURITY.mdオープンenhancement
難易度 1/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
modem: ppp: CMUX DLCI receive buffer overruns on large downlink packets対応中かも @pedrohqr が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
zephyrproject-rtos/zephyr#126195 ·
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
ly05010419/MacNativeGames#2271 ·
メンテナーはふだん 1 日以内に返信
-
slice
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Life-Framework/Life-Framework#2694 ·
メンテナーはふだん 1 日以内に返信