Skip to content

Commit

Permalink
remove automatic http2 support, instead opt-in (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana authored May 17, 2023
1 parent 826c719 commit a38d315
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func registerApp(name string, appCmds []cli.Command) *cli.App {
app.Commands = commands
app.Author = "MinIO, Inc."
app.Version = pkg.Version + " - " + pkg.ShortCommitID
app.Copyright = "(c) 2020 MinIO, Inc."
app.Copyright = "(c) 2020-2023 MinIO, Inc."
app.Compiled, _ = time.Parse(time.RFC3339, pkg.ReleaseTime)
app.Flags = append(app.Flags, profileFlags...)
app.Flags = append(app.Flags, globalFlags...)
Expand Down
4 changes: 3 additions & 1 deletion cli/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ func clientTransport(ctx *cli.Context) http.RoundTripper {

// Because we create a custom TLSClientConfig, we have to opt-in to HTTP/2.
// See https://github.com/golang/go/issues/14275
http2.ConfigureTransport(tr)
if ctx.Bool("http2") {
http2.ConfigureTransport(tr)
}
}
return tr
}
Expand Down
5 changes: 5 additions & 0 deletions cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,9 @@ var ioFlags = []cli.Flag{
Usage: "Disable HTTP Keep-Alive",
Hidden: true,
},
cli.BoolFlag{
Name: "http2",
Usage: "enable HTTP2 support if server supports it",
Hidden: true,
},
}

0 comments on commit a38d315

Please sign in to comment.