Skip to content

Commit be8f0f1

Browse files
committed
Ensure that invalid HTTP client URI are correctly reported
1 parent 4eab5e0 commit be8f0f1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/test/java/io/vertx/core/http/Http1xTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,6 +2614,21 @@ public void testServerInvalidHttpMessage() throws Exception {
26142614
await();
26152615
}
26162616

2617+
@Test
2618+
public void testClientInvalidHttpMessage() throws Exception {
2619+
server.requestHandler(req -> {
2620+
fail();
2621+
});
2622+
startServer(testAddress);
2623+
client.request(new RequestOptions(requestOptions).setURI("/a\rb"))
2624+
.compose(HttpClientRequest::send)
2625+
.onFailure(err -> {
2626+
assertEquals(IllegalArgumentException.class, err.getClass());
2627+
testComplete();
2628+
});
2629+
await();
2630+
}
2631+
26172632
@Test
26182633
public void testClientMaxInitialLineLengthOption() {
26192634

0 commit comments

Comments
 (0)