diff --git a/java/server/test/org/openqa/selenium/grid/web/EnsureSpecCompliantHeadersTest.java b/java/server/test/org/openqa/selenium/grid/web/EnsureSpecCompliantHeadersTest.java index af6a58cfb5818..2933b0757e6a7 100644 --- a/java/server/test/org/openqa/selenium/grid/web/EnsureSpecCompliantHeadersTest.java +++ b/java/server/test/org/openqa/selenium/grid/web/EnsureSpecCompliantHeadersTest.java @@ -45,6 +45,15 @@ public void shouldBlockRequestsWithNoContentType() { assertThat(res.getStatus()).isEqualTo(HTTP_INTERNAL_ERROR); } + @Test + public void shouldAllowRequestsWithNoContentTypeWhenSkipCheckOnMatches() { + HttpResponse res = new EnsureSpecCompliantHeaders(ImmutableList.of(), ImmutableSet.of("/gouda")) + .apply(alwaysOk) + .execute(new HttpRequest(POST, "/gouda")); + + assertThat(res.getStatus()).isEqualTo(HTTP_OK); + } + @Test public void requestsWithAnOriginHeaderShouldBeBlocked() { HttpResponse res = new EnsureSpecCompliantHeaders(ImmutableList.of(), ImmutableSet.of())