Apparently AWS or some other provider doesn't set the Content-Length header for all get object requests and we assume it can never be nil. Since it's only used for metrics we can allow them to be incorrect in those cases.
Proper fix would be to wrap the returned io.ReadCloser with one that will count the bytes read but that feels a bit much for some edge cases.
Fixes #556
Also replaced #555 with this by wrapping all possibly unsafe uses of AWS SDK returned pointers.
Apparently AWS or some other provider doesn't set the Content-Length header for all get object requests and we assume it can never be nil. Since it's only used for metrics we can allow them to be incorrect in those cases.
Proper fix would be to wrap the returned
io.ReadCloser
with one that will count the bytes read but that feels a bit much for some edge cases.Fixes #556
Also replaced #555 with this by wrapping all possibly unsafe uses of AWS SDK returned pointers.