From d14b8f5ba469428bf5486d7685f9be929e55af41 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Wed, 17 Feb 2016 08:24:57 -0800 Subject: [PATCH] Fixed standard engine request#Host() Signed-off-by: Vishal Rana --- engine/standard/request.go | 2 +- handler/static.go | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/engine/standard/request.go b/engine/standard/request.go index 0e5c11f8..13e6cdbe 100644 --- a/engine/standard/request.go +++ b/engine/standard/request.go @@ -24,7 +24,7 @@ func NewRequest(r *http.Request) *Request { } func (r *Request) Host() string { - return r.Host() + return r.request.Host } func (r *Request) URL() engine.URL { diff --git a/handler/static.go b/handler/static.go index 6a0c4a15..b40f4613 100644 --- a/handler/static.go +++ b/handler/static.go @@ -15,9 +15,6 @@ type ( Browse bool Index string } - - FaviconOptions struct { - } ) func (s Static) Handle(c echo.Context) error { @@ -83,10 +80,8 @@ func (s Static) Handle(c echo.Context) error { } // Favicon serves the default favicon - GET /favicon.ico. -func Favicon(root string, options ...FaviconOptions) echo.MiddlewareFunc { - return func(h echo.Handler) echo.Handler { - return echo.HandlerFunc(func(c echo.Context) error { - return nil - }) +func Favicon() echo.HandlerFunc { + return func(c echo.Context) error { + return nil } }