Description
openedon Sep 27, 2016
The calls that make use of an HTTP PUT are not properly closing the body, which is preventing reuse of HTTPS connections. This badly hurts performance, and can cause ephemeral connection exhaustion on the client. This is most obvious if you call something like PutBlob, SetBlobProperties or CopyBlob a lot of times.
I've bodged around this for now by adding io.Copy(ioutil.Discard, resp.body)
after the operations that have been a problem for me as in bcc@df61165
It strikes me that this isn't a great solution though - none of the PUT operations on blobs actually do anything with the response body, and a skim through the other non-blob functions suggests that might be universally true. If that's the case, it might be better to fix this in client.exec by clearing out the body if verb == PUT, but I'm not sure if that might be a mistake later on.