diff options
author | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-09-11 13:21:00 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-09-11 13:21:00 +0200 |
commit | 560b31537c24086b7e5d8b97783c4fc2bf1db35b (patch) | |
tree | 07f5de2da0f04b63e7765058b6560a788d133fe1 /vespa-feed-client | |
parent | 9f57f42441d23479ab04eca24c96e300a7b1cd65 (diff) |
Include Jetty version in user agent
Diffstat (limited to 'vespa-feed-client')
-rw-r--r-- | vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java | 3 |
1 files changed, 2 insertions, 1 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 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()); |