[Jetty-Client] fix: don't add host automaticaly on http2 request.

All google server answers bad request when Host field is filled with h2 protocol.

Change-Id: I9e16f8c9f56bc26df0b0a933cee0b3a3d6c31921
Signed-off-by: Stéphane Martin <stephane.martin@neotys.com>
This commit is contained in:
Stéphane Martin 2016-03-24 18:39:21 +01:00
parent 81c8708c52
commit 1c8b0869fd
1 changed files with 1 additions and 1 deletions

View File

@ -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());