update vendor/ dir to latest w/o heroku, moby

had to lock a lot of things in place
This commit is contained in:
Reed Allman
2017-08-03 02:38:15 -07:00
parent 780791da1c
commit 30f3c45dbc
5637 changed files with 191713 additions and 1133103 deletions

View File

@@ -18,15 +18,20 @@ import "net/http"
func newSecureAPI(ctx *Context, next http.Handler) http.Handler {
return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
route, _ := ctx.RouteInfo(r)
route, rCtx, _ := ctx.RouteInfo(r)
if rCtx != nil {
r = rCtx
}
if route != nil && len(route.Authenticators) == 0 {
next.ServeHTTP(rw, r)
return
}
if _, err := ctx.Authorize(r, route); err != nil {
if _, rCtx, err := ctx.Authorize(r, route); err != nil {
ctx.Respond(rw, r, route.Produces, route, err)
return
} else {
r = rCtx
}
next.ServeHTTP(rw, r)