mirror of
https://github.com/labstack/echo.git
synced 2025-01-26 03:20:08 +02:00
parent
296498c942
commit
34e964851f
@ -53,8 +53,4 @@ func TestBasicAuth(t *testing.T) {
|
|||||||
he = h.Handle(c).(*echo.HTTPError)
|
he = h.Handle(c).(*echo.HTTPError)
|
||||||
assert.Equal(t, http.StatusUnauthorized, he.Code())
|
assert.Equal(t, http.StatusUnauthorized, he.Code())
|
||||||
assert.Equal(t, basic+" realm=Restricted", res.Header().Get(echo.WWWAuthenticate))
|
assert.Equal(t, basic+" realm=Restricted", res.Header().Get(echo.WWWAuthenticate))
|
||||||
|
|
||||||
// WebSocket
|
|
||||||
c.Request().Header().Set(echo.Upgrade, echo.WebSocket)
|
|
||||||
assert.NoError(t, h.Handle(c))
|
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ func (r *Router) insert(method, path string, h Handler, t kind, ppath string, pn
|
|||||||
// Node already exists
|
// Node already exists
|
||||||
if h != nil {
|
if h != nil {
|
||||||
cn.addHandler(method, h)
|
cn.addHandler(method, h)
|
||||||
cn.ppath = path
|
cn.ppath = ppath
|
||||||
cn.pnames = pnames
|
cn.pnames = pnames
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user