1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 01:00:57 +00:00

filter should be always the same

This commit is contained in:
astaxie 2015-06-14 18:35:46 +08:00
parent 64d4f6518b
commit ba1232dfaf

View File

@ -611,6 +611,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
if p.enableFilter { if p.enableFilter {
if l, ok := p.filters[pos]; ok { if l, ok := p.filters[pos]; ok {
for _, filterR := range l { for _, filterR := range l {
if filterR.returnOnOutput && w.started {
return true
}
if ok, params := filterR.ValidRouter(urlPath); ok { if ok, params := filterR.ValidRouter(urlPath); ok {
for k, v := range params { for k, v := range params {
context.Input.Params[k] = v context.Input.Params[k] = v