上限扩展到512kb

This commit is contained in:
lu7213 committed 2026-10-26 08:50:52 -04:00
1 parent 02dd5668d5
commit 6358dff6e2
5 files changed
+42 -22

No files matched your search

@@ -1312,6 +1312,12 @@ public class RentalBusinessTest {
@Test
public void boundedJsonAndSsrfGuard() throws Exception {
// HTTP允许恰好512 KiB的ASCII JSON,超出1字节拒绝;节点通道仍保持64 KiB。
String httpBoundary = "\"" + String.join("", Collections.nCopies(
RentalJson.MAX_HTTP_BODY_BYTES - 2, "a")) + "\"";
RentalJson.bounded(httpBoundary, RentalJson.MAX_HTTP_BODY_BYTES);
expectFailure(() -> RentalJson.bounded(httpBoundary + " ", RentalJson.MAX_HTTP_BODY_BYTES));
expectFailure(() -> RentalJson.bounded(httpBoundary));
expectFailure(
() ->
RentalJson.bounded(