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

Add streaming field limits to `FormParser`

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

Los mantenedores suelen responder en 1 día

@Kludex ya está trabajando en esto.

Desde el 4/10/2026.

  • #333 de @Kludex — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
backend

Línea de trabajo

Start by reading FormParser and QuerystringParser, then inspect linked pull request #333 for the work already underway. Verify behavior across chunk boundaries and finalize(), with limits disabled by default and parser exceptions on exceeded field-count or field-size limits.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

FormParser already assembles URL-encoded fields and exposes an on_field callback, but it has no field-count or per-field size limits. MAX_BODY_SIZE cannot express these limits, and checking field size in on_field is too late: the field has already been buffered.

Add optional limits for the number of fields and the combined raw name/value size of each URL-encoded field. Enforce size limits before buffering the incoming bytes, raise a parser exception when a limit is exceeded, and leave limits disabled by default for compatibility. Enforcement must work across chunk boundaries and include the final field emitted by finalize().

Starlette currently implements these limits and field assembly around QuerystringParser, including a message queue. Upstream limits would let it reuse FormParser and remove that duplicated assembly and queue-draining logic. Context: starlette#3599. This is a feature request, not a finalization bug in python-multipart; the caller would still call finalize() after stream exhaustion.

Lenguaje dominante
Python
Estrellas
537
Forks
104
Merge medio
3 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 Kludex/python-multipart

Todos los issues de Kludex/python-multipart

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.