Skip to content

Commit 65fac43

Browse files
committed
test: Use HTTP_NO_CONTENT and add single-dot traversal vector to ExtrasWildcardIT
1 parent 4264989 commit 65fac43

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/test/java/com/retailsvc/http/ExtrasWildcardIT.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import static java.net.HttpURLConnection.HTTP_BAD_REQUEST;
44
import static java.net.HttpURLConnection.HTTP_NOT_FOUND;
5+
import static java.net.HttpURLConnection.HTTP_NO_CONTENT;
56
import static java.net.HttpURLConnection.HTTP_OK;
67
import static org.assertj.core.api.Assertions.assertThat;
78

@@ -80,7 +81,7 @@ void exactExtraStillWorks() throws Exception {
8081
.build();
8182
var client = httpClient()) {
8283

83-
assertThat(get(client, s, "/alive").statusCode()).isEqualTo(204);
84+
assertThat(get(client, s, "/alive").statusCode()).isEqualTo(HTTP_NO_CONTENT);
8485
assertThat(get(client, s, "/alive232").statusCode()).isEqualTo(HTTP_NOT_FOUND);
8586
}
8687
}
@@ -114,6 +115,7 @@ void traversalReturns400() throws Exception {
114115
// assertThat(get(client, s, "/files/x%0ay").statusCode()).isEqualTo(HTTP_BAD_REQUEST);
115116
assertThat(get(client, s, "/files//x").statusCode()).isEqualTo(HTTP_BAD_REQUEST);
116117
assertThat(get(client, s, "/files/.").statusCode()).isEqualTo(HTTP_BAD_REQUEST);
118+
assertThat(get(client, s, "/files/./x").statusCode()).isEqualTo(HTTP_BAD_REQUEST);
117119
}
118120
}
119121

0 commit comments

Comments
 (0)