Skip to content

Acknowledge form data that was buffered before the demuxer was created - #14456

Merged
dstepanov merged 4 commits into
5.2.xfrom
denis/multipart-initial-demand
Nov 14, 2026
Merged

dstepanov merged 4 commits into
5.2.xfrom
denis/multipart-initial-demand

Conversation

@dstepanov

@dstepanov dstepanov commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Data the body had buffered reaches the FormDemuxer while it subscribes, before
its upstream is set, so it was counted but not acknowledged. If that data ended
between two parts nothing acknowledged it later, and the upstream stopped
reading once that much was outstanding.

Tests: FormDemuxerInitialDemandTest, which fails without the change.

Follow-up commit: when the buffered data already fails the form, the upstream is now also told that the rest may be discarded. New test dataBufferedBeforeTheDemuxerThatFailsTheFormLetsTheRestBeDiscarded fails without it.

Data the body had buffered reaches the FormDemuxer while it subscribes, before
its upstream is set, so it was counted but not acknowledged. If that data ended
between two parts nothing acknowledged it later, and the upstream stopped
reading once that much was outstanding.
@dstepanov dstepanov added the type: bug Something isn't working label Nov 13, 2026
A form that fails on the data the body had buffered fails while the demuxer
subscribes, before its upstream is set, so the upstream was never told that
the rest may be discarded, and the connection stalled after the error response
once the buffered data had used up the read demand.
@dstepanov
dstepanov marked this pull request as ready for review November 13, 2026 10:40
…mpleted

The demand update after the demuxer starts also told the upstream that the
rest of the body may be discarded when the buffered data had already
completed the form, after the request body had ended. It now only runs for a
form that is still open or that failed.
@sonarqubecloud

Copy link
Copy Markdown

@dstepanov
dstepanov merged commit fb64e9a into 5.2.x Nov 14, 2026
18 checks passed
@dstepanov
dstepanov deleted the denis/multipart-initial-demand branch November 14, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants