http_static: a prefix with a trailing slash matches no file, and nothing says so
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 62/100
Hướng nghiên cứu
Bắt đầu từ kiểm tra route trong src/ext_http.c, nơi byte sau tiền tố đã đăng ký phải là / hoặc là cuối đường dẫn. Tái hiện lỗi bằng một đăng ký duy nhất http_static of ["/s1/", "files"] và một yêu cầu GET tới /s1/a.txt, yêu cầu này cần trả về 404. Chọn một trong hai kết quả mà issue cho phép: hoặc khớp với dạng có dấu gạch chéo cuối, hoặc từ chối ngay khi đăng ký, rồi ghi lại lựa chọn trong docs/BUILTINS.md. Hoàn thành khi cả hai cách viết đều được bao phủ bởi một test khởi động server và tải về một tệp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C
- Star
- 3
- Fork
- 7
- Merge trung bình
- 3 giờ 30 phút
- Pull request đã merge (30 ngày)
- 264
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của InauguralSystems/EigenScript
-
http_fetch tests: the two no-child rows fail, not skip, where a task's children file does not existCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea:http kind:gate-defect
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
InauguralSystems/EigenScript#2397 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordĐang mởarea:http kind:silent-wrong
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
InauguralSystems/EigenScript#2394 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:docs good first issue kind:docs-drift
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
InauguralSystems/EigenScript#2360 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:stdlib kind:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
InauguralSystems/EigenScript#2355 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
InauguralSystems/EigenScript#2335 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của InauguralSystems/EigenScript
Issue tương tự
-
Add SECURITY.mdĐang mởenhancement
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
modem: ppp: CMUX DLCI receive buffer overruns on large downlink packetsCó thể đã có người làm @pedrohqr đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
zephyrproject-rtos/zephyr#126195 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
ly05010419/MacNativeGames#2271 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
slice
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Life-Framework/Life-Framework#2694 ·
Maintainer thường phản hồi trong vòng 1 ngày