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/roundrobin/rebalancer.go
generated
vendored
4
vendor/github.com/vulcand/oxy/roundrobin/rebalancer.go
generated
vendored
|
@ -148,7 +148,7 @@ func (rb *Rebalancer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
defer logEntry.Debug("vulcand/oxy/roundrobin/rebalancer: competed ServeHttp on request")
|
||||
}
|
||||
|
||||
pw := &utils.ProxyWriter{W: w}
|
||||
pw := utils.NewSimpleProxyWriter(w)
|
||||
start := rb.clock.UtcNow()
|
||||
|
||||
// make shallow copy of request before changing anything to avoid side effects
|
||||
|
@ -194,7 +194,7 @@ func (rb *Rebalancer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
|
||||
rb.next.Next().ServeHTTP(pw, &newReq)
|
||||
|
||||
rb.recordMetrics(newReq.URL, pw.Code, rb.clock.UtcNow().Sub(start))
|
||||
rb.recordMetrics(newReq.URL, pw.StatusCode(), rb.clock.UtcNow().Sub(start))
|
||||
rb.adjustWeights()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue