mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 09:10:55 +00:00
add w.started fix #208
This commit is contained in:
parent
4ce584c5a6
commit
048be29fcd
18
router.go
18
router.go
@ -316,6 +316,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
for _, filterR := range l {
|
||||
if filterR.ValidRouter(r.URL.Path) {
|
||||
filterR.filterFunc(context)
|
||||
if w.started {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -351,6 +354,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
for _, filterR := range l {
|
||||
if filterR.ValidRouter(r.URL.Path) {
|
||||
filterR.filterFunc(context)
|
||||
if w.started {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -423,6 +429,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
for _, filterR := range l {
|
||||
if filterR.ValidRouter(r.URL.Path) {
|
||||
filterR.filterFunc(context)
|
||||
if w.started {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -572,6 +581,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
for _, filterR := range l {
|
||||
if filterR.ValidRouter(r.URL.Path) {
|
||||
filterR.filterFunc(context)
|
||||
if w.started {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -614,6 +626,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
for _, filterR := range l {
|
||||
if filterR.ValidRouter(r.URL.Path) {
|
||||
filterR.filterFunc(context)
|
||||
if w.started {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -665,6 +680,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
for _, filterR := range l {
|
||||
if filterR.ValidRouter(r.URL.Path) {
|
||||
filterR.filterFunc(context)
|
||||
if w.started {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user