mitchellh / goamz

Golang Amazon Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

vivienschilis opened this issue · comments

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