File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
test/fixtures/s3-fixture/src/main/java/fixture/s3 Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -582,11 +582,17 @@ private static HttpHeaderParser.Range parsePartRange(final HttpExchange exchange
582582 }
583583
584584 private static boolean isProtectOverwrite (final HttpExchange exchange ) {
585- final var ifNoneMatch = exchange .getRequestHeaders ().getFirst ("If-None-Match" );
585+ final var ifNoneMatch = exchange .getRequestHeaders ().get ("If-None-Match" );
586586
587587 if (ifNoneMatch == null ) {
588588 return false ;
589- } else if (ifNoneMatch .equals ("*" )) {
589+ }
590+
591+ if (ifNoneMatch .size () != 1 ) {
592+ throw new AssertionError ("multiple If-None-Match headers found: " + ifNoneMatch );
593+ }
594+
595+ if (ifNoneMatch .getFirst ().equals ("*" )) {
590596 return true ;
591597 }
592598
You can’t perform that action at this time.
0 commit comments