http_static: a prefix with a trailing slash matches no file, and nothing says so
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 62/100
Direzione di ricerca
Inizia dal controllo delle route in src/ext_http.c, dove il byte dopo il prefisso registrato deve essere / oppure la fine del percorso. Riproduci il problema con una singola registrazione http_static of ["/s1/", "files"] e una GET verso /s1/a.txt, che dovrebbe restituire 404. Scegli uno dei due esiti ammessi dalla issue: far corrispondere la forma con barra finale oppure rifiutarla in fase di registrazione, e registra la scelta in docs/BUILTINS.md. Il lavoro è completo quando entrambe le grafie sono coperte da un test che avvia un server e recupera un file.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C
- Stelle
- 3
- Fork
- 7
- Merge medio
- 3h 30m
- PR unite (30g)
- 264
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di InauguralSystems/EigenScript
-
http_fetch tests: the two no-child rows fail, not skip, where a task's children file does not existForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea:http kind:gate-defect
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
InauguralSystems/EigenScript#2397 ·
I maintainer di solito rispondono entro 1 giorno
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordApertaarea:http kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
InauguralSystems/EigenScript#2394 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:docs good first issue kind:docs-drift
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
InauguralSystems/EigenScript#2360 ·
I maintainer di solito rispondono entro 1 giorno
-
area:stdlib kind:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
InauguralSystems/EigenScript#2355 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
InauguralSystems/EigenScript#2335 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InauguralSystems/EigenScript
Issue simili
-
Add SECURITY.mdApertaenhancement
Difficoltà 1/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
modem: ppp: CMUX DLCI receive buffer overruns on large downlink packetsForse già presa @pedrohqr l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
zephyrproject-rtos/zephyr#126195 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
ly05010419/MacNativeGames#2271 ·
I maintainer di solito rispondono entro 1 giorno
-
slice
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Life-Framework/Life-Framework#2694 ·
I maintainer di solito rispondono entro 1 giorno