Fix missing ac for file handler
@@ -251,13 +251,11 @@ func (m *Mux) hasFileResponse(req *http.Request) (http.Handler, *server.Options,
route := node.Value.(*openapi3filter.Route)
fileHandler := route.Handler
if p, isProtected := fileHandler.(ac.ProtectedHandler); isProtected {
- fileHandler = p.Child()
srvCtxOpts = p.Child().(server.Context).Options()
- }
-
- if fh, ok := fileHandler.(handler.HasResponse); ok {
+ if fh, ok := p.Child().(handler.HasResponse); ok {
return fileHandler, srvCtxOpts, fh.HasResponse(req)
}
+ }
return fileHandler, srvCtxOpts, false
}
