extent object body by len not capacity
It does not break the test, but if someone copy/pastes the test code
the object gotten from S3 will have holes in it because the object
is extented by the buffer size, not the number of bytes read from
the stream.
@@ -229,7 +229,7 @@ fn test_get_object(client: &TestClient, bucket: &str, filename: &str) {
}
println!("read {} bytes", len);
- body.extend_from_slice(&buf);
+ body.extend_from_slice(&buf[0..len]);
}
assert!(body.len() > 0);
