Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(repeater): introduce max-body-size to avoid breaking socket connection on large responses #585

Merged
merged 5 commits into from
Aug 13, 2024

Conversation

bramkor
Copy link
Contributor

@bramkor bramkor commented Aug 7, 2024

Introduce a maxBodySize limit to manage large response bodies, truncating or omitting them as necessary to prevent socket connection disruptions

…ction on large responses

Introduce max-body-size limit, so large reponse bodies will be
truncated/omitted, so it wont break the socket connection.

PAP-1125 #code-review
@bramkor bramkor added the Type: bug Something isn't working. label Aug 7, 2024
@bramkor bramkor self-assigned this Aug 7, 2024
…ction on large responses

Introduce max-body-size limit, so large reponse bodies will be
truncated/omitted, so it wont break the socket connection.

PAP-1125 #code-review
src/Commands/RunRepeater.ts Outdated Show resolved Hide resolved
src/RequestExecutor/HttpRequestExecutor.ts Outdated Show resolved Hide resolved
src/RequestExecutor/HttpRequestExecutor.ts Outdated Show resolved Hide resolved
src/RequestExecutor/HttpRequestExecutor.ts Outdated Show resolved Hide resolved
src/RequestExecutor/HttpRequestExecutor.ts Outdated Show resolved Hide resolved
src/RequestExecutor/HttpRequestExecutor.ts Show resolved Hide resolved
src/RequestExecutor/HttpRequestExecutor.ts Outdated Show resolved Hide resolved
src/RequestExecutor/HttpRequestExecutor.ts Outdated Show resolved Hide resolved
src/RequestExecutor/HttpRequestExecutor.ts Outdated Show resolved Hide resolved
src/RequestExecutor/HttpRequestExecutor.ts Outdated Show resolved Hide resolved
bram kortooms added 2 commits August 8, 2024 16:44
…ction on large responses

Introduce max-body-size limit, so large reponse bodies will be
truncated/omitted, so it wont break the socket connection.

PAP-1125 #code-review
@bramkor
Copy link
Contributor Author

bramkor commented Aug 8, 2024

@denis-maiorov-brightsec I remember now that Avishai also asked to write an error-log in case truncation/omission happens for white-listed mime-types, so I will still need to make a change to the code

@bramkor bramkor marked this pull request as ready for review August 13, 2024 08:40
@bramkor bramkor merged commit 94ca28d into master Aug 13, 2024
6 checks passed
@bramkor bramkor deleted the fix-#pap-1125/handle-large-bodies branch August 13, 2024 09:30
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