Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed Dec 5, 2024
1 parent 9cedd29 commit 38a1b6e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void testRangeHandlingDefinedMethods() throws Exception {
String rangeHeader = "bytes=0-10";
// Get and Head

requestHeaders.computeIfAbsent("Range", (k) -> List.of(rangeHeader));
requestHeaders.put("Range",List.of(rangeHeader));
int rc = getUrl(path, responseBody, requestHeaders, responseHeaders);
Assert.assertEquals("Range requests is turn on, SC_PARTIAL_CONTENT of GET is expected",
HttpServletResponse.SC_PARTIAL_CONTENT, rc);
Expand Down Expand Up @@ -90,7 +90,7 @@ public void testUnsupportedRangeUnit() throws Exception {
String rangeHeader = "Chars=0-10";
// Get and Head

requestHeaders.computeIfAbsent("Range", (k) -> List.of(rangeHeader));
requestHeaders.put("Range",List.of(rangeHeader));
int rc = getUrl(path, responseBody, requestHeaders, responseHeaders);
Assert.assertEquals(
"RFC 9110 - 14.2: An origin server MUST ignore a Range header field that contains a range unit it does not understand. `Chars` is not a understandable RangeUnit, SC_OK is expected",
Expand Down

0 comments on commit 38a1b6e

Please sign in to comment.