048be29f by astaxie

add w.started fix #208

1 parent 4ce584c5
Showing 1 changed file with 18 additions and 0 deletions
...@@ -316,6 +316,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -316,6 +316,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
316 for _, filterR := range l { 316 for _, filterR := range l {
317 if filterR.ValidRouter(r.URL.Path) { 317 if filterR.ValidRouter(r.URL.Path) {
318 filterR.filterFunc(context) 318 filterR.filterFunc(context)
319 if w.started {
320 return
321 }
319 } 322 }
320 } 323 }
321 } 324 }
...@@ -351,6 +354,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -351,6 +354,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
351 for _, filterR := range l { 354 for _, filterR := range l {
352 if filterR.ValidRouter(r.URL.Path) { 355 if filterR.ValidRouter(r.URL.Path) {
353 filterR.filterFunc(context) 356 filterR.filterFunc(context)
357 if w.started {
358 return
359 }
354 } 360 }
355 } 361 }
356 } 362 }
...@@ -423,6 +429,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -423,6 +429,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
423 for _, filterR := range l { 429 for _, filterR := range l {
424 if filterR.ValidRouter(r.URL.Path) { 430 if filterR.ValidRouter(r.URL.Path) {
425 filterR.filterFunc(context) 431 filterR.filterFunc(context)
432 if w.started {
433 return
434 }
426 } 435 }
427 } 436 }
428 } 437 }
...@@ -572,6 +581,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -572,6 +581,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
572 for _, filterR := range l { 581 for _, filterR := range l {
573 if filterR.ValidRouter(r.URL.Path) { 582 if filterR.ValidRouter(r.URL.Path) {
574 filterR.filterFunc(context) 583 filterR.filterFunc(context)
584 if w.started {
585 return
586 }
575 } 587 }
576 } 588 }
577 } 589 }
...@@ -614,6 +626,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -614,6 +626,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
614 for _, filterR := range l { 626 for _, filterR := range l {
615 if filterR.ValidRouter(r.URL.Path) { 627 if filterR.ValidRouter(r.URL.Path) {
616 filterR.filterFunc(context) 628 filterR.filterFunc(context)
629 if w.started {
630 return
631 }
617 } 632 }
618 } 633 }
619 } 634 }
...@@ -665,6 +680,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -665,6 +680,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
665 for _, filterR := range l { 680 for _, filterR := range l {
666 if filterR.ValidRouter(r.URL.Path) { 681 if filterR.ValidRouter(r.URL.Path) {
667 filterR.filterFunc(context) 682 filterR.filterFunc(context)
683 if w.started {
684 return
685 }
668 } 686 }
669 } 687 }
670 } 688 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!