Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OB1 error #15

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Fix OB1 error #15

merged 1 commit into from
Feb 28, 2024

Conversation

jhiemstrawisc
Copy link
Member

The range header was malformed, causing objects that didn't fit in a single buffer to fail on GET.

@jhiemstrawisc jhiemstrawisc merged commit 6c240c8 into main Feb 28, 2024
1 check passed
Comment on lines 388 to 394
bool AmazonS3Download::SendRequest( off_t offset, size_t size ) {
if( offset != 0 || size != 0 ) {
std::string range;
formatstr( range, "bytes=%zu-%zu", offset, offset + size );
formatstr( range, "bytes=%zu-%zu", offset, offset + size -1 );
headers["Range"] = range.c_str();
this->expectedResponseCode = 206;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[lint] reported by reviewdog 🐶

Suggested change
bool AmazonS3Download::SendRequest( off_t offset, size_t size ) {
if( offset != 0 || size != 0 ) {
std::string range;
formatstr( range, "bytes=%zu-%zu", offset, offset + size );
formatstr( range, "bytes=%zu-%zu", offset, offset + size -1 );
headers["Range"] = range.c_str();
this->expectedResponseCode = 206;
}
bool AmazonS3Download::SendRequest(off_t offset, size_t size) {
if (offset != 0 || size != 0) {
std::string range;
formatstr(range, "bytes=%zu-%zu", offset, offset + size - 1);
headers["Range"] = range.c_str();
this->expectedResponseCode = 206;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant