1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-17 01:43:02 +02:00

Fixed Request.Out

Signed-off-by: Vishal Rana <vishal.rana@verizon.com>
This commit is contained in:
Vishal Rana
2015-12-21 15:18:03 -08:00
parent 0884290766
commit cced590a16
8 changed files with 191 additions and 237 deletions

View File

@ -22,11 +22,11 @@ const (
func BasicAuth(fn BasicValidateFunc) echo.HandlerFunc {
return func(c echo.Context) error {
// Skip WebSocket
if (c.Request().Header.Get(echo.Upgrade)) == echo.WebSocket {
if (c.Request().Header().Get(echo.Upgrade)) == echo.WebSocket {
return nil
}
auth := c.Request().Header.Get(echo.Authorization)
auth := c.Request().Header().Get(echo.Authorization)
l := len(Basic)
if len(auth) > l+1 && auth[:l] == Basic {