Fix incorrect weak ETag assertion

See gh-33374
This commit is contained in:
Riley Park
2024-08-12 19:45:30 -07:00
committed by rstoyanchev
parent 1911ca728d
commit 1703b71563
2 changed files with 8 additions and 2 deletions

View File

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