You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zmuxuny (via GitHub)" <gi...@apache.org> on 2026/10/18 06:32:54 UTC
[PR] fix: bound integration HTTP response bodies [rocketmq-dashboard]
zmuxuny opened a new pull request, #6927:
URL: https://github.com/apache/rocketmq-dashboard/pull/6927
### 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.
```
cd server
mvn -B -ntp \
-Dtest=BoundedResponseBodyInterceptorTest,SettingsServiceTest,NotificationResponseBodyLimitTest,NotificationOutboxServiceTest,DataSourceClientHttpRequestFactoryTest \
test
```
- Focused matrix: **119 tests, 0 failures, 0 errors, 0 skipped**.
- Checkstyle: **0 violations**; `git diff --check` passes.
- Coverage includes success/error statuses, exact-limit acceptance, absent/understated Content-Length, bounded incremental reads, stream/response cleanup, small error details, timeout/redirect behavior, and notification retry/exhaustion.
- Negative control: the 14 new service-level size-limit cases fail against unchanged production sources at the base commit (14 assertion failures, 0 errors), and pass with the patch.
Runner details: Maven/test heaps were capped at 512 MiB and Mockito was attached with `-javaagent`. The existing `NotificationOutboxServiceTest` mock fixtures use `example.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 address `192.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
- [x] One coherent change; no unrelated refactor or dependency change
- [x] Conventional commit subject
- [x] Regression tests use the `...Test` naming convention
- [x] New source files carry ASF license headers
- [x] Changed behavior documented in `server/README.md`
AI assistance was used for implementation, independent code review and test execution.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: bound integration HTTP response bodies [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub) via commits" <co...@rocketmq.apache.org>.
github-actions[bot] commented on PR #6927:
URL: https://github.com/apache/rocketmq-dashboard/pull/6927#issuecomment-6551016596
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: bound integration HTTP response bodies [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub) via commits" <co...@rocketmq.apache.org>.
github-actions[bot] closed pull request #6927: fix: bound integration HTTP response bodies
URL: https://github.com/apache/rocketmq-dashboard/pull/6927
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org