summaryrefslogtreecommitdiffstats
path: root/vespa-feed-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'vespa-feed-client/src')
-rw-r--r--vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java
index 9b2b91699ac..9f5523b062c 100644
--- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java
+++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java
@@ -70,11 +70,9 @@ class JettyCluster implements Cluster {
Endpoint endpoint = findLeastBusyEndpoint(endpoints);
long reqTimeoutMillis = req.timeout() != null
? req.timeout().toMillis() * 11 / 10 + 1000 : IDLE_TIMEOUT.toMillis();
- Request jettyReq = client.newRequest(endpoint.uri.getHost(), portOf(endpoint.uri))
+ Request jettyReq = client.newRequest(URI.create(endpoint.uri + req.path()))
.version(HttpVersion.HTTP_2)
- .scheme(endpoint.uri.getScheme())
.method(HttpMethod.fromString(req.method()))
- .path(req.path())
.headers(hs -> req.headers().forEach((k, v) -> hs.add(k, v.get())))
.idleTimeout(IDLE_TIMEOUT.toMillis(), MILLISECONDS)
.timeout(reqTimeoutMillis, MILLISECONDS);
@@ -164,8 +162,8 @@ class JettyCluster implements Cluster {
private static class Endpoint {
final AtomicInteger inflight = new AtomicInteger();
- final URI uri;
- Endpoint(URI uri) { this.uri = uri; }
+ final String uri;
+ Endpoint(URI uri) { this.uri = String.format("%s://%s:%s", uri.getScheme(), uri.getHost(), portOf(uri)); }
}
private static class FeedContent extends AbstractRequestContent {