Disable closeNotify when method GET for http pipelining
This commit is contained in:
parent
f35d574759
commit
2387010556
7 changed files with 94 additions and 45 deletions
4
vendor/github.com/vulcand/oxy/cbreaker/cbreaker.go
generated
vendored
4
vendor/github.com/vulcand/oxy/cbreaker/cbreaker.go
generated
vendored
|
@ -156,12 +156,12 @@ func (c *CircuitBreaker) activateFallback(w http.ResponseWriter, req *http.Reque
|
|||
|
||||
func (c *CircuitBreaker) serve(w http.ResponseWriter, req *http.Request) {
|
||||
start := c.clock.UtcNow()
|
||||
p := &utils.ProxyWriter{W: w}
|
||||
p := utils.NewSimpleProxyWriter(w)
|
||||
|
||||
c.next.ServeHTTP(p, req)
|
||||
|
||||
latency := c.clock.UtcNow().Sub(start)
|
||||
c.metrics.Record(p.Code, latency)
|
||||
c.metrics.Record(p.StatusCode(), latency)
|
||||
|
||||
// Note that this call is less expensive than it looks -- checkCondition only performs the real check
|
||||
// periodically. Because of that we can afford to call it here on every single response.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue