Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

misconfigured `servlet-root` leads to confusing state

Aperta
#141 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Ambito
backend, web-dev

Direzione di ricerca

Riproduci la configurazione usando la radice dei file "htdocs" e la radice dei servlet ".", quindi traccia il ciclo di filesystem-map.rkt intorno alla riga segnalata e il Racket issue 5488 collegato. Determina dove la configurazione errata viene ignorata e valuta come il server web possa fornire una risposta chiara invece della pagina generica di file non trovato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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! 😅

Lingua principale
Racket
Stelle
100
Fork
48
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di racket/web-server

Tutte le issue di racket/web-server

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.