From f3491c089b4da77fd8d2bc942a88b6b8d117a8a5 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 16 Sep 2021 17:12:37 +0300 Subject: Move plugins to a separate repository Signed-off-by: Valery Piashchynski --- plugins/http/config/http2.go | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 plugins/http/config/http2.go (limited to 'plugins/http/config/http2.go') diff --git a/plugins/http/config/http2.go b/plugins/http/config/http2.go deleted file mode 100644 index b1e109e9..00000000 --- a/plugins/http/config/http2.go +++ /dev/null @@ -1,28 +0,0 @@ -package config - -// HTTP2 HTTP/2 server customizations. -type HTTP2 struct { - // h2cHandler is a Handler which implements h2c by hijacking the HTTP/1 traffic - // that should be h2c traffic. There are two ways to begin a h2c connection - // (RFC 7540 Section 3.2 and 3.4): (1) Starting with Prior Knowledge - this - // works by starting an h2c connection with a string of bytes that is valid - // HTTP/1, but unlikely to occur in practice and (2) Upgrading from HTTP/1 to - // h2c - this works by using the HTTP/1 Upgrade header to request an upgrade to - // h2c. When either of those situations occur we hijack the HTTP/1 connection, - // convert it to a HTTP/2 connection and pass the net.Conn to http2.ServeConn. - - // H2C enables HTTP/2 over TCP - H2C bool - - // MaxConcurrentStreams defaults to 128. - MaxConcurrentStreams uint32 `mapstructure:"max_concurrent_streams"` -} - -// InitDefaults sets default values for HTTP/2 configuration. -func (cfg *HTTP2) InitDefaults() error { - if cfg.MaxConcurrentStreams == 0 { - cfg.MaxConcurrentStreams = 128 - } - - return nil -} -- cgit v1.2.3