From 2563fe9a5170cef979b37740d0bb740eb3428b55 Mon Sep 17 00:00:00 2001 From: Julien Viet Date: Sun, 24 Sep 2023 18:36:51 +0200 Subject: [PATCH] Update to HTTP client changes --- .../main/java/io/vertx/ext/web/client/impl/HttpContext.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vertx-web-client/src/main/java/io/vertx/ext/web/client/impl/HttpContext.java b/vertx-web-client/src/main/java/io/vertx/ext/web/client/impl/HttpContext.java index e8c93514db..efd3beb1ac 100644 --- a/vertx-web-client/src/main/java/io/vertx/ext/web/client/impl/HttpContext.java +++ b/vertx-web-client/src/main/java/io/vertx/ext/web/client/impl/HttpContext.java @@ -22,6 +22,7 @@ import io.vertx.core.http.HttpClientResponse; import io.vertx.core.http.HttpHeaders; import io.vertx.core.http.RequestOptions; +import io.vertx.core.http.impl.HttpClientImpl; import io.vertx.core.http.impl.HttpClientInternal; import io.vertx.core.impl.ContextInternal; import io.vertx.core.impl.future.PromiseInternal; @@ -263,7 +264,7 @@ public void receiveResponse(HttpClientResponse clientResponse) { this.clientResponse = clientResponse; if (redirects < maxRedirects && sc >= 300 && sc < 400) { redirects++; - Future next = client.redirectHandler().apply(clientResponse); + Future next = ((HttpClientImpl)client).redirectHandler().apply(clientResponse); if (next != null) { if (redirectedLocations.isEmpty()) { redirectedLocations = new ArrayList<>();