上限扩展到512kb
This commit is contained in:
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(
|
||||
|
||||
Reference in new issue
Block a user