Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add streaming field limits to `FormParser`

オープン
#332 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Kludex がすでに取り組んでいます。

2026年10月4日 から。

  • #333 @Kludex による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
537
フォーク
104
平均マージ
3時間
マージ済み PR(30日)
4

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Kludex/python-multipart のほかの issue

Kludex/python-multipart の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。