Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

HttpPost.Dispose skips Content disposal when data step throws

Abierto
#32 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp
Área
backend

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

bug severity:low

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Garados007/MaxLib.WebServer

Todos los issues de Garados007/MaxLib.WebServer

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.