1.5 KiB
Streaming and Large Bodies
Response lifecycle
A streaming download returns BlockingStreamingResponse, never a bare InputStream. Closing is
idempotent and always releases the connection — after a full read, a partial read, a decode failure,
or a size rejection. The status is validated before any body byte is delivered, so a failed download
never becomes a half-consumed stream the caller has to reason about.
Wire bytes and decoded bytes are bounded independently, because a compressed payload passes a wire check and then expands. Limits are enforced while reading, not after buffering.
The first-byte boundary
response headers received
→ nothing delivered yet
→ a read-only operation may still be retried
→ the response is handed to the caller
→ transparent retry is no longer possible
Retrying after delivery would replay a stream the caller has already partly consumed, producing duplicated or reordered data that no downstream code can detect. The streaming gateway hands out the response only after the attempt has finished, so there is no retry left to run once the caller reads.
Request bodies
A reopenable body is opened once per attempt, which is what makes it replayable; reusing the previous stream would silently send an empty body on the retry. A one-shot stream is never retried.
Server-sent events
The platform has no server-sent-event client. It was part of the reactive stack, which was removed (decision 9, 2026-09-25): the platform runs blocking calls on the caller's thread only.