Skip to content

Conversation

@aagbsn
Copy link

@aagbsn aagbsn commented Dec 1, 2025

Checklist

Description

Adds helper LimitBodyReader to wrap http.Response.Body and limit maximum payload to 128MB; also apply this limit to the NDT7 download test

This adds a helper method that limits reading http.Response.Body to
the minimum of Content-Length or MaxPayloadSize (128MB).

Usage of netxlite.ReadAllContext and netxlite.StreamAllContext should
only be used with an io.LimitedReader in order to prevent memory
exhaustion.
Set the maximum request size to 128MB to prevent memory exhaustion.
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.

1 participant