Skip to content

fix: stream ZIP downloads directly to response to prevent OOM#369

Open
sridhar-3009 wants to merge 1 commit into
vxcontrol:mainfrom
sridhar-3009:fix/zip-download-streaming-338
Open

fix: stream ZIP downloads directly to response to prevent OOM#369
sridhar-3009 wants to merge 1 commit into
vxcontrol:mainfrom
sridhar-3009:fix/zip-download-streaming-338

Conversation

@sridhar-3009

Copy link
Copy Markdown

Replace bytes.Buffer accumulation in DownloadFlowFile with direct streaming to c.Writer for both the single-directory and multi-path ZIP cases, eliminating the in-memory buffer that could OOM the server for large archives.

Closes #338

…rol#338)

Replace bytes.Buffer accumulation in DownloadFlowFile with direct streaming
to c.Writer for both single-directory and multi-path ZIP cases. Headers are
set before writing begins; Content-Length is omitted since the archive size
is not known upfront. Removes the bytes import that is no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ZIP downloads buffer the entire archive in memory [Introduced in 2.1.0]

1 participant