Return processed length from `QuerystringParser._internal_write` by bysiber · Pull Request #229 · Kludex/python-multipart

@bysiber

…length

When max_size truncation occurs, write() passes a smaller length
to _internal_write which only processes that many bytes. But
_internal_write returns len(data) (the original untrunated size),
inflating _current_size tracking and returning a misleading byte
count to the caller.

MultipartParser._internal_write correctly returns length. This
makes QuerystringParser consistent.

Repository owner deleted a comment from hkmj19

Apr 5, 2026

@Kludex changed the title Fix QuerystringParser._internal_write returning len(data) instead of length Return processed length from QuerystringParser._internal_write

Apr 5, 2026

@Kludex