From 1c8b0869fdeea1a6528a8e50d066765b18d58356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Martin?= Date: Thu, 24 Mar 2016 18:39:21 +0100 Subject: [PATCH] [Jetty-Client] fix: don't add host automaticaly on http2 request. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All google server answers bad request when Host field is filled with h2 protocol. Change-Id: I9e16f8c9f56bc26df0b0a933cee0b3a3d6c31921 Signed-off-by: Stéphane Martin --- .../src/main/java/org/eclipse/jetty/client/HttpConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java index 9cebf944a4f..aa0536ae618 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java @@ -111,7 +111,7 @@ public abstract class HttpConnection implements Connection } // If we are HTTP 1.1, add the Host header - if (version.getVersion() > 10) + if (version.getVersion() == 11) { if (!headers.containsKey(HttpHeader.HOST.asString())) headers.put(getHttpDestination().getHostField());