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

Revert "Revert "Fixed Request.Out""

This reverts commit 72050d765b.
This commit is contained in:
Vishal Rana
2015-12-21 15:20:49 -08:00
parent 72050d765b
commit 33d8813eb5
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 {