From 044ef15af97e9fa048b3464a42fc0b6f5c8037ba Mon Sep 17 00:00:00 2001 From: Mark Thomas Date: Thu, 12 Dec 2024 17:52:09 +0000 Subject: [PATCH] Invalid If-Range header should result in a 400 response --- .../catalina/servlets/TestDefaultServletRangeRequests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/org/apache/catalina/servlets/TestDefaultServletRangeRequests.java b/test/org/apache/catalina/servlets/TestDefaultServletRangeRequests.java index 170787c06c19..af6031a159db 100644 --- a/test/org/apache/catalina/servlets/TestDefaultServletRangeRequests.java +++ b/test/org/apache/catalina/servlets/TestDefaultServletRangeRequests.java @@ -97,9 +97,9 @@ public static Collection parameters() { // Valid parameterSets.add(new Object[] { "bytes=0-9", lastModified, Integer.valueOf(206), "10", "0-9/" + len }); - // Nonsense date (return whole entity) + // Nonsense data (request rejected) parameterSets.add(new Object[] { - "bytes=0-9", "a-b-c", Integer.valueOf(200), strLen, ""}); + "bytes=0-9", "a-b-c", Integer.valueOf(400), null, ""}); // Different date (return whole entity) parameterSets.add(new Object[] { "bytes=0-9", FastHttpDateFormat.formatDate(1000), Integer.valueOf(200), strLen, ""});