From 6914162d64dd26ccd90d7c8b00290364337c134c Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Thu, 18 Feb 2016 14:05:40 -0800 Subject: [PATCH] Removed HTTP2 option Signed-off-by: Vishal Rana --- echo.go | 16 ---------------- glide.lock | 1 - glide.yaml | 1 - 3 files changed, 18 deletions(-) diff --git a/echo.go b/echo.go index 679ac7a9..c069f350 100644 --- a/echo.go +++ b/echo.go @@ -44,7 +44,6 @@ import ( "sync" "github.com/labstack/gommon/log" - "golang.org/x/net/http2" "golang.org/x/net/websocket" ) @@ -53,7 +52,6 @@ type ( Echo struct { prefix string middleware []MiddlewareFunc - http2 bool maxParam *int httpErrorHandler HTTPErrorHandler binder Binder @@ -239,7 +237,6 @@ func New() (e *Echo) { // Defaults //---------- - e.HTTP2(true) e.SetHTTPErrorHandler(e.DefaultHTTPErrorHandler) e.SetBinder(&binder{}) @@ -264,11 +261,6 @@ func (e *Echo) Logger() Logger { return e.logger } -// HTTP2 enable/disable HTTP2 support. -func (e *Echo) HTTP2(on bool) { - e.http2 = on -} - // DefaultHTTPErrorHandler invokes the default HTTP error handler. func (e *Echo) DefaultHTTPErrorHandler(err error, c *Context) { code := http.StatusInternalServerError @@ -578,10 +570,6 @@ func (e *Echo) ServeHTTP(w http.ResponseWriter, r *http.Request) { // Server returns the internal *http.Server. func (e *Echo) Server(addr string) *http.Server { s := &http.Server{Addr: addr, Handler: e} - // TODO: Remove in Go 1.6+ - if e.http2 { - http2.ConfigureServer(s, nil) - } return s } @@ -607,10 +595,6 @@ func (e *Echo) RunTLSServer(s *http.Server, crtFile, keyFile string) { func (e *Echo) run(s *http.Server, files ...string) { s.Handler = e - // TODO: Remove in Go 1.6+ - if e.http2 { - http2.ConfigureServer(s, nil) - } if len(files) == 0 { e.logger.Fatal(s.ListenAndServe()) } else if len(files) == 2 { diff --git a/glide.lock b/glide.lock index a7f4c740..cc9fc02d 100644 --- a/glide.lock +++ b/glide.lock @@ -19,7 +19,6 @@ imports: version: 04b9de9b512f58addf28c9853d50ebef61c3953e subpackages: - /context - - http2 - websocket - name: golang.org/x/text version: 6fc2e00a0d64b1f7fc1212dae5b0c939cf6d9ac4 diff --git a/glide.yaml b/glide.yaml index c65faaeb..d7b68124 100644 --- a/glide.yaml +++ b/glide.yaml @@ -8,5 +8,4 @@ import: - package: golang.org/x/net subpackages: - /context - - http2 - websocket