diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpRequest.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpRequest.java index ab13015febb..78241bb28b3 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpRequest.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpRequest.java @@ -241,7 +241,8 @@ public class HttpRequest implements Request @Override public Request agent(String agent) { - return header(HttpHeader.USER_AGENT, agent); + headers.put(HttpHeader.USER_AGENT, agent); + return this; } @Override