HttpPost.Dispose skips Content disposal when data step throws
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 76/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C#
- Estrellas
- 0
- Forks
- 2
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 4
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Garados007/MaxLib.WebServer
-
documentation good first issue severity:low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
bug severity:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
bug security severity:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
-
bug severity:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
bug severity:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Todos los issues de Garados007/MaxLib.WebServer
Issues similares
-
type/automation type/tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
area-integrations
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Problem launching the programAbierto:watch: Not Triaged dotnet-framework/svc install-deployment/subsvc
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
[Tool] DirectBenchAbiertohas-image has-readme needs-attention new-tool repo-verified
Dificultad 1/5 1-3 horas Aptitud para principiantes 62/100
shanselman/TinyToolTown#844 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
:watch: Not Triaged Pri3
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día