|
@@ -656,9 +656,6 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
|
|
|
}
|
|
}
|
|
|
hasTrailers := trailers != ""
|
|
hasTrailers := trailers != ""
|
|
|
|
|
|
|
|
- body, contentLen := bodyAndLength(req)
|
|
|
|
|
- hasBody := body != nil
|
|
|
|
|
-
|
|
|
|
|
cc.mu.Lock()
|
|
cc.mu.Lock()
|
|
|
cc.lastActive = time.Now()
|
|
cc.lastActive = time.Now()
|
|
|
if cc.closed || !cc.canTakeNewRequestLocked() {
|
|
if cc.closed || !cc.canTakeNewRequestLocked() {
|
|
@@ -666,6 +663,9 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
|
|
|
return nil, errClientConnUnusable
|
|
return nil, errClientConnUnusable
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ body, contentLen := bodyAndLength(req)
|
|
|
|
|
+ hasBody := body != nil
|
|
|
|
|
+
|
|
|
// TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
|
|
// TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
|
|
|
var requestedGzip bool
|
|
var requestedGzip bool
|
|
|
if !cc.t.disableCompression() &&
|
|
if !cc.t.disableCompression() &&
|