HttpPost.Dispose skips Content disposal when data step throws
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 76/100
Direzione di ricerca
Start in MaxLib.WebServer/HttpPost.cs:118-161 and read both HttpPost.Dispose() and DisposeAsync(). Trace the LazyData.Value and IPostData disposal failure paths described in the issue, then verify that Content is disposed for every path while only the re-observed parse fault is swallowed. Done means disposal exceptions retain the specified propagation behavior and the ContentStream reader and timeout source are cleaned up.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
HttpPost.Dispose()/DisposeAsync() have no try/finally around the data step, so Content is never disposed if that step throws. Two triggers: a lazy parse that faulted (e.g. multipart with Content-Length: 0 or a boundary over 508 chars, read via Data) is rethrown at await LazyData.Value; or the parsed IPostData's own disposal throws (e.g. UnknownPostData hitting the ContentStream read timeout while draining). The ContentStream's reader and timeout CancellationTokenSource are left undisposed, and a re-thrown parse fault is logged a second time as "Unhandled exception".
Location: MaxLib.WebServer/HttpPost.cs:118-161
Fix: Wrap the whole body of both methods in try/finally with the Content disposal in the finally. Swallow only the re-observed parse fault from LazyData.Value; let a genuinely new exception from the data disposal propagate after Content is disposed.
- Lingua principale
- C#
- Stelle
- 1
- Fork
- 3
- 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
- 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 Garados007/MaxLib.WebServer
-
Reason-phrase table has misspelled entries (`Unathorized`, `Switching Protcols`, `Multiple Choises`)Forse già presa @Jah-yee l’ha presa 13 giorni fa. Apertabug severity:low
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
documentation good first issue severity:low
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
bug severity:low
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
bug security severity:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
-
bug severity:low
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Tutte le issue di Garados007/MaxLib.WebServer
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Self-contained Windows build crashes on "Open Explorer": System.Diagnostics.Process not foundApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
icsharpcode/ILSpy#4277 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
k2-fsa/sherpa-onnx#4098 ·
I maintainer di solito rispondono entro 2 giorni
-
bug effort:S P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nightscout/nocturne#2633 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100