1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-27 09:55:22 +00:00

force http2 server to send back plain encoding.

This commit is contained in:
Darien Raymond 2018-04-20 16:10:32 +02:00
parent 93d095c766
commit a7103481d5
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

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