Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore request body after reading in
sign
method
Fixes awslabs#225 The problem is the the `sign` method in ProxyClient reads the `req.Body` and that results in a closed reader. When the request is actually send to the transport later, the body cannot be read and results in a body length of 0 which does not match the passed req.ContentLength. We tried to write tests for this, but the tests are not fully matching the real world because: * they use io.NopCloser * they use a HTTP mock client that doesn't actually read the body to send to the proxy (makes sense, its a mock, but it's different than the actual implementation)
- Loading branch information