Polishing contribution

Closes gh-33374
This commit is contained in:
rstoyanchev
2024-08-13 16:59:13 +03:00
parent 1703b71563
commit fe4fd00429
2 changed files with 6 additions and 7 deletions

View File

@@ -191,15 +191,15 @@ class HttpHeadersTests {
}
@Test
void illegalETag() {
void illegalETagWithoutQuotes() {
String eTag = "v2.6";
assertThatIllegalArgumentException().isThrownBy(() -> headers.setETag(eTag));
}
@Test
void illegalETagWithoutQuoteAfterWSlash() {
void illegalWeakETagWithoutLeadingQuote() {
String etag = "W/v2.6\"";
assertThatIllegalArgumentException().as("Invalid Weak ETag").isThrownBy(() -> headers.setETag(etag));
assertThatIllegalArgumentException().isThrownBy(() -> headers.setETag(etag));
}
@Test