Repository navigation
fix: bound integration HTTP response bodies - #6927
Merged
lizhimins merged 2 commits intoNov 27, 2026
Merged
Conversation
|
This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes. |
Open
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief Description
Bound the datasource connection-test and notification webhook HTTP response bodies to 5 MiB (5,242,880 bytes), matching the existing Prometheus metrics-query budget.
A shared interceptor runs before Spring's string conversion and HTTP error handling. It rejects an oversized advertised Content-Length, and otherwise reads at most the limit plus one byte, so missing or understated lengths are handled consistently. Accepted responses retain their status, headers and body; rejected responses close their streams and responses.
Datasource tests report a specific size-limit failure. Webhook delivery uses the existing retry/exhaustion policy. Timeouts, URL validation and redirect behavior are unchanged. The server README documents the boundary.
How Did You Test This Change?
Verified on
rocketmq-studio@c34535db0819d02f68e50a856cb3d2614f0dc5dd, using Temurin 21.0.12.1 and Maven 3.9.11.git diff --checkpasses.Runner details: Maven/test heaps were capped at 512 MiB and Mockito was attached with
-javaagent. The existingNotificationOutboxServiceTestmock fixtures useexample.com; the cloud runner's DNS environment rejects that name before the mocked request. For the 119-test run only,-Djdk.net.hosts.file=<test-hosts-file>mapped it to the documentation address192.0.2.1. No OS hosts file was changed. The new response-limit tests use numeric documentation addresses and pass without this override; all HTTP responses are in-process fixtures.No live integration endpoint, full MySQL-backed backend suite, frontend build or production deployment was exercised locally. CI status should be assessed on this PR's actual head.
Checklist
...Testnaming conventionserver/README.mdAI assistance was used for implementation, independent code review and test execution.