1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-22 20:06:21 +02:00

Removed HTTP2 option

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-02-18 14:05:40 -08:00
parent 8490000762
commit 6914162d64
3 changed files with 0 additions and 18 deletions

16
echo.go
View File

@ -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 {

1
glide.lock generated
View File

@ -19,7 +19,6 @@ imports:
version: 04b9de9b512f58addf28c9853d50ebef61c3953e
subpackages:
- /context
- http2
- websocket
- name: golang.org/x/text
version: 6fc2e00a0d64b1f7fc1212dae5b0c939cf6d9ac4

View File

@ -8,5 +8,4 @@ import:
- package: golang.org/x/net
subpackages:
- /context
- http2
- websocket