Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch reading from S3 to io.Copy from io.ReadFull (#4225)
* Switch reading from S3 to io.Copy from io.ReadFull If the Content-Length header wasn't being sent back, the current behavior could panic. It's unclear when it will not be sent; it appears to be CORS dependent. But this works around it by not trying to preallocate a buffer of a specific size and instead just read until EOF. In addition I noticed that Close wasn't being called. https://docs.aws.amazon.com/sdk-for-go/api/service/s3/#GetObjectOutput specifies that Body is an io.ReadCloser so I added a call to Close. Fixes #4222 * Add some extra efficiency
- Loading branch information