diff options
author | Valery Piashchynski <[email protected]> | 2021-09-16 17:12:37 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-09-16 17:12:37 +0300 |
commit | f3491c089b4da77fd8d2bc942a88b6b8d117a8a5 (patch) | |
tree | 32bfffb1f24eeee7b909747cc00a6a6b9fd3ee83 /plugins/http/config/http2.go | |
parent | 5d2cd55ab522d4f1e65a833f91146444465a32ac (diff) |
Move plugins to a separate repository
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/http/config/http2.go')
-rw-r--r-- | plugins/http/config/http2.go | 28 |
1 files changed, 0 insertions, 28 deletions
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 -} |