mitchellh / goamz

Golang Amazon Library
Other
672 stars 216 forks source link

The aws http client doesn't seem to be working very well with the S3 client on retry #243

Open vivienschilis opened 9 years ago

vivienschilis commented 9 years ago

It seems like the second time the request Body is read. it returns "" which creates the following error

--- FAIL: TestClient_retries (0.10 seconds) client2_test.go:51: Put http:/foobar/foofile: http: Request.ContentLength=12 with Body length 0

I wrote a test for it: https://gist.github.com/vivienschilis/f771b5cd9c0ac9093e04

Maybe you have an idea on how to fix it. Doing a ioutil.ReadAll during the roundtrip might not be very elegant.

Let me know if you need more input data. Thank you