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

OPTIONS responses ignore the actual routes

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
api, backend

Direzione di ricerca

The OPTIONS handling lives in MaxLib.WebServer/Services/HttpHeaderSpecialAction.cs, reached from ParseRequest; start there, then read the WebService interface and the Builder that derives routes from [Path] and [Method] to find where a path-acceptance probe would hook in. RoutingDryRun is explicitly ruled out as too heavy. Done means a handled path answers 204 with an Allow header listing the union of supported methods, otherwise 404 — but the interface design is still open.

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

Descrizione

bug enhancement severity:low

HttpHeaderSpecialAction answers every OPTIONS request in ParseRequest
(HttpHeaderSpecialAction.cs):

  • It answers for every path, including paths no service handles.
  • It always lists GET POST HEAD OPTIONS TRACE. Some of these may not be supported for the path, and other supported methods are missing.

RoutingDryRun cannot be used for this: it needs a complete request (method, headers, …), it only answers "accepted or not", and it collects analytics that are too costly per request.

Proposal

Add a lightweight path probe that follows the normal execution flow, but checks only the path:

  • Ask each service whether it accepts the path. Ignore method, arguments, headers and body.
  • Return whether any service accepts the path, plus the union of the methods those services support.

HttpHeaderSpecialAction then answers:

  • path accepted: 204 No Content with an Allow header listing the union of methods
  • path not accepted: 404 Not Found

Open points

  • How a service reports path acceptance and supported methods, for example an optional interface on WebService. The Builder can derive both from [Path] and [Method].
  • How to represent "any method" (a Builder route without [Method]).
  • Custom services that cannot answer the probe: whether to treat them as "accepts the path, any method", or to skip them.
Lingua principale
C#
Stelle
0
Fork
2
Merge medio
1g 9h
PR unite (30g)
4

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 Garados007/MaxLib.WebServer

Tutte le issue di Garados007/MaxLib.WebServer

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.