From 560b31537c24086b7e5d8b97783c4fc2bf1db35b Mon Sep 17 00:00:00 2001 From: Bjørn Christian Seime Date: Mon, 11 Sep 2023 13:21:00 +0200 Subject: Include Jetty version in user agent --- .../src/main/java/ai/vespa/feed/client/impl/JettyCluster.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vespa-feed-client/src/main/java') 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 48c4e9ca9bb..3a5c98ca27c 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 @@ -26,6 +26,7 @@ import org.eclipse.jetty.http2.client.http.ClientConnectionFactoryOverHTTP2; import org.eclipse.jetty.io.ClientConnectionFactory; import org.eclipse.jetty.io.ClientConnector; import org.eclipse.jetty.util.HttpCookieStore; +import org.eclipse.jetty.util.Jetty; import org.eclipse.jetty.util.Pool; import org.eclipse.jetty.util.Promise; import org.eclipse.jetty.util.SocketAddressResolver; @@ -161,7 +162,7 @@ class JettyCluster implements Cluster { httpClient.setMaxRequestsQueuedPerDestination(Integer.MAX_VALUE); httpClient.setFollowRedirects(false); httpClient.setUserAgentField( - new HttpField(HttpHeader.USER_AGENT, String.format("vespa-feed-client/%s (Jetty)", Vespa.VERSION))); + new HttpField(HttpHeader.USER_AGENT, String.format("vespa-feed-client/%s (Jetty:%s)", Vespa.VERSION, Jetty.VERSION))); // Stop client from trying different IP address when TLS handshake fails httpClient.setSocketAddressResolver(new Ipv4PreferringResolver(httpClient, Duration.ofSeconds(10))); httpClient.setCookieStore(new HttpCookieStore.Empty()); -- cgit v1.2.3