From a7103481d5a0a1166e85e96764a39af36ec28821 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Fri, 20 Apr 2018 16:10:32 +0200 Subject: [PATCH] force http2 server to send back plain encoding. --- transport/internet/http/dialer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transport/internet/http/dialer.go b/transport/internet/http/dialer.go index 7e4ab49d..ba4f2022 100644 --- a/transport/internet/http/dialer.go +++ b/transport/internet/http/dialer.go @@ -97,7 +97,11 @@ func Dial(ctx context.Context, dest net.Destination) (internet.Connection, error Proto: "HTTP/2", ProtoMajor: 2, ProtoMinor: 0, + Header: make(http.Header), } + // Disable any compression method from server. + request.Header.Set("Accept-Encoding", "identity") + response, err := client.Do(request) if err != nil { return nil, newError("failed to dial to ", dest).Base(err).AtWarning()