mirror of https://github.com/minio/minio.git
				
				
				
			Disable http2 until we have upstream bugs fixed (#7711)
We should revert this PR in future once we have upstream bugs fixed regarding http2 behavior
This commit is contained in:
		
							parent
							
								
									0c16b1c9a7
								
							
						
					
					
						commit
						993a79d9c6
					
				|  | @ -26,7 +26,6 @@ import ( | |||
| 	"time" | ||||
| 
 | ||||
| 	humanize "github.com/dustin/go-humanize" | ||||
| 	"golang.org/x/net/http2" | ||||
| 
 | ||||
| 	"github.com/minio/minio-go/v6/pkg/set" | ||||
| 	"github.com/minio/minio/pkg/certs" | ||||
|  | @ -56,9 +55,6 @@ const ( | |||
| 
 | ||||
| 	// DefaultMaxHeaderBytes - default maximum HTTP header size in bytes.
 | ||||
| 	DefaultMaxHeaderBytes = 1 * humanize.MiByte | ||||
| 
 | ||||
| 	// DefaultHTTP2MaxConcurrentStreams - default value for HTTP 2.0 maximum concurrent streams allowed.
 | ||||
| 	DefaultHTTP2MaxConcurrentStreams = 1024 | ||||
| ) | ||||
| 
 | ||||
| // Server - extended http.Server supports multiple addresses to serve and enhanced connection handling.
 | ||||
|  | @ -133,11 +129,6 @@ func (srv *Server) Start() (err error) { | |||
| 
 | ||||
| 	// Start servicing with listener.
 | ||||
| 	if tlsConfig != nil { | ||||
| 		if err = http2.ConfigureServer(&srv.Server, &http2.Server{ | ||||
| 			MaxConcurrentStreams: DefaultHTTP2MaxConcurrentStreams, | ||||
| 		}); err != nil { | ||||
| 			return err | ||||
| 		} | ||||
| 		return srv.Server.Serve(tls.NewListener(listener, tlsConfig)) | ||||
| 	} | ||||
| 	return srv.Server.Serve(listener) | ||||
|  | @ -211,7 +202,14 @@ func NewServer(addrs []string, handler http.Handler, getCert certs.GetCertificat | |||
| 			CipherSuites:             defaultCipherSuites, | ||||
| 			CurvePreferences:         secureCurves, | ||||
| 			MinVersion:               tls.VersionTLS12, | ||||
| 			NextProtos:               []string{"h2", "http/1.1"}, | ||||
| 			// Do not edit the next line, protos priority is kept
 | ||||
| 			// on purpose in this manner for HTTP 2.0, we would
 | ||||
| 			// still like HTTP 2.0 clients to negotiate connection
 | ||||
| 			// to server if needed but by default HTTP 1.1 is
 | ||||
| 			// expected. We need to change this in future
 | ||||
| 			// when we wish to go back to HTTP 2.0 as default
 | ||||
| 			// priority for HTTP protocol negotiation.
 | ||||
| 			NextProtos: []string{"http/1.1", "h2"}, | ||||
| 		} | ||||
| 		tlsConfig.GetCertificate = getCert | ||||
| 	} | ||||
|  |  | |||
|  | @ -28,7 +28,6 @@ import ( | |||
| 	"time" | ||||
| 
 | ||||
| 	xhttp "github.com/minio/minio/cmd/http" | ||||
| 	"golang.org/x/net/http2" | ||||
| ) | ||||
| 
 | ||||
| // DefaultRESTTimeout - default RPC timeout is one minute.
 | ||||
|  | @ -118,12 +117,6 @@ func NewClient(url *url.URL, tlsConfig *tls.Config, timeout time.Duration, newAu | |||
| 		TLSClientConfig:       tlsConfig, | ||||
| 		DisableCompression:    true, | ||||
| 	} | ||||
| 	if tlsConfig != nil { | ||||
| 		// If TLS is enabled configure http2
 | ||||
| 		if err := http2.ConfigureTransport(tr); err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 	} | ||||
| 	return &Client{ | ||||
| 		httpClient:          &http.Client{Transport: tr}, | ||||
| 		httpIdleConnsCloser: tr.CloseIdleConnections, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue