fix: paginate dropship pallet print details
This commit is contained in:
@@ -31,6 +31,7 @@ public class PrintRequestSizeFilter extends OncePerRequestFilter {
|
||||
private static final java.util.Set<String> PATHS = java.util.Set.of(
|
||||
"/internal/print/v1/pdfs/inbound-marks",
|
||||
"/internal/print/v1/pdfs/fba-pallet-labels",
|
||||
"/internal/print/v1/pdfs/dropship-pallet-a4-documents",
|
||||
"/internal/print/v1/pdfs/freight-a4-documents");
|
||||
|
||||
@Resource private PrintPdfProperties properties;
|
||||
|
||||
@@ -62,6 +62,17 @@ class PrintRequestSizeFilterTest {
|
||||
assertTooLarge(response);
|
||||
}
|
||||
|
||||
@Test
|
||||
void capsDropshipPalletRequestsBeforeDeserialization() throws Exception {
|
||||
var response = new MockHttpServletResponse();
|
||||
AtomicReference<Boolean> called = new AtomicReference<>(false);
|
||||
filter.doFilter(request("12345678901", true,
|
||||
"/internal/print/v1/pdfs/dropship-pallet-a4-documents"), response,
|
||||
(ignoredRequest, ignoredResponse) -> called.set(true));
|
||||
assertThat(called).hasValue(false);
|
||||
assertTooLarge(response);
|
||||
}
|
||||
|
||||
@Test
|
||||
void rejectsOversizedDeclaredContentLengthWithoutCallingDownstream() throws Exception {
|
||||
MockHttpServletRequest request = new MockHttpServletRequest() {
|
||||
|
||||
Reference in New Issue
Block a user