http_static: a prefix with a trailing slash matches no file, and nothing says so
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 62/100
Direção de pesquisa
Comece pela verificação de rota em src/ext_http.c, onde o byte após o prefixo registrado deve ser / ou o fim do caminho. Reproduza com um único registro http_static of ["/s1/", "files"] e um GET para /s1/a.txt, que deve retornar 404. Escolha um dos dois resultados que a issue permite, ou corresponder à forma com barra final ou rejeitá-la no registro, e registre a escolha em docs/BUILTINS.md. Está concluído quando as duas grafias estiverem cobertas por um teste que inicia um servidor e busca um arquivo.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- C
- Estrelas
- 3
- Forks
- 7
- Merge médio
- 3h 30min
- PRs com merge (30d)
- 264
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de InauguralSystems/EigenScript
-
http_fetch tests: the two no-child rows fail, not skip, where a task's children file does not existTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertaarea:http kind:gate-defect
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
InauguralSystems/EigenScript#2397 ·
Mantenedores costumam responder em até 1 dia
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordAbertaarea:http kind:silent-wrong
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
InauguralSystems/EigenScript#2394 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
area:docs good first issue kind:docs-drift
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
InauguralSystems/EigenScript#2360 ·
Mantenedores costumam responder em até 1 dia
-
area:stdlib kind:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
InauguralSystems/EigenScript#2355 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
needs-triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
InauguralSystems/EigenScript#2335 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de InauguralSystems/EigenScript
Issues semelhantes
-
on_ctrl_redirect(): iterator never advances — infinite loop stalls the event loop at 100% CPUAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
openziti/ziti-sdk-c#1254 ·
Mantenedores costumam responder em até 1 dia
-
Add SECURITY.mdAbertaenhancement
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
-
modem: ppp: CMUX DLCI receive buffer overruns on large downlink packetsTalvez já em andamento @pedrohqr assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
zephyrproject-rtos/zephyr#126195 ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
ly05010419/MacNativeGames#2271 ·
Mantenedores costumam responder em até 1 dia