diff --git a/.github/workflows/ci.yml b/.github/workflows/ci-4.x.yml
similarity index 94%
rename from .github/workflows/ci.yml
rename to .github/workflows/ci-4.x.yml
index ac29e09..469dfd0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci-4.x.yml
@@ -1,13 +1,13 @@
-name: CI
+name: vertx-http-proxy (4.x)
on:
push:
branches:
- main
- - '[0-9]+.[0-9]+'
+ - '[0-9]+.[0-9x]+'
pull_request:
branches:
- main
- - '[0-9]+.[0-9]+'
+ - '[0-9]+.[0-9x]+'
schedule:
- cron: '0 4 * * *'
jobs:
diff --git a/pom.xml b/pom.xml
index 1895bfc..c86d654 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,12 +24,12 @@
vertx-http-proxy
- 5.0.0-SNAPSHOT
+ 4.4.10-SNAPSHOT
Vert.x Http Proxy
- 5.0.0-SNAPSHOT
+ 4.4.10-SNAPSHOT
${project.build.directory}
false
${project.basedir}/src/main/resources/META-INF/MANIFEST.MF
diff --git a/src/test/java/io/vertx/httpproxy/ProxyRequestTest.java b/src/test/java/io/vertx/httpproxy/ProxyRequestTest.java
index 390e267..1073d90 100644
--- a/src/test/java/io/vertx/httpproxy/ProxyRequestTest.java
+++ b/src/test/java/io/vertx/httpproxy/ProxyRequestTest.java
@@ -99,11 +99,11 @@ public void testChunkedFrontendRequest(TestContext ctx) {
req.response().end("Hello World");
}, ctx.asyncAssertSuccess());
HttpClient httpClient = vertx.createHttpClient();
- httpClient
- .request(HttpMethod.GET, 8080, "localhost", "/somepath")
- .compose(HttpClientRequest::send)
- .compose(HttpClientResponse::body)
- .onComplete(ctx.asyncAssertSuccess());
+ httpClient.request(HttpMethod.GET, 8080, "localhost", "/somepath")
+ .compose(req -> req
+ .send()
+ .compose(HttpClientResponse::body))
+ .onComplete(ctx.asyncAssertSuccess());
}
@Test
@@ -117,10 +117,13 @@ public void testNonChunkedFrontendRequest(TestContext ctx) {
}, ctx.asyncAssertSuccess());
HttpClient httpClient = vertx.createHttpClient();
httpClient
- .request(HttpMethod.POST, 8080, "localhost", "/somepath")
- .compose(req -> req.setChunked(true).send("chunk"))
- .compose(HttpClientResponse::body)
- .onComplete(ctx.asyncAssertSuccess());
+ .request(HttpMethod.POST, 8080, "localhost", "/somepath")
+ .compose(req -> req
+ .setChunked(true)
+ .send("chunk")
+ .andThen(ctx.asyncAssertSuccess(resp -> ctx.assertEquals(200, resp.statusCode())))
+ .compose(HttpClientResponse::end))
+ .onComplete(ctx.asyncAssertSuccess());
}
@Ignore
@@ -132,9 +135,14 @@ public void testIllegalTransferEncodingBackendResponse(TestContext ctx) {
"connection: close\r\n" +
"\r\n"), ctx.asyncAssertSuccess());
HttpClient httpClient = vertx.createHttpClient();
- httpClient.request(HttpMethod.GET, 8080, "localhost", "/somepath")
- .compose(req -> req.send().compose(HttpClientResponse::body))
- .onComplete(ctx.asyncAssertSuccess());
+ httpClient
+ .request(HttpMethod.POST, 8080, "localhost", "/somepath")
+ .compose(req -> req
+ .setChunked(true)
+ .send("chunk")
+ .andThen(ctx.asyncAssertSuccess(resp -> ctx.assertEquals(200, resp.statusCode())))
+ .compose(HttpClientResponse::end))
+ .onComplete(ctx.asyncAssertSuccess());
}
@Test