From f7baf9923fe809e2fc550419f6bf00382b5897f9 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 23 Oct 2014 12:41:16 +0200 Subject: [PATCH] Fixed issue caused by the fix to #447746: user agent header must not be added, but overwritten. --- .../src/main/java/org/eclipse/jetty/client/HttpRequest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 827ca84b5b0..6449d507b60 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