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 a bug with edge-case in get_object() method in Google Storage Driver #1547

Merged
merged 4 commits into from Jan 22, 2021

Conversation

Kami
Copy link
Member

@Kami Kami commented Jan 22, 2021

This pull request fixes issue reported in #1544.

Background, Context

In some scenarios, Google Storage S3 compatible API returns object size in x-goog-stored-content-length header of in content-length one.

Before this change, our code didn't correctly handle this case. updated the code so object.size attribute populated in get_object() is an integer and not a string - this way it's consistent with list_objects() method.

As part of this PR, I also

Thanks

Thanks to @RunOrVeith for reporting this issue.

In some situations, Google Storage wuld return object size in
x-goog-stored-content-length header and not content-length one and our
code didn't correctly handle that scenario.

As part of this change, I also updated the code to correctly cast
object.size attribute to int when using "get_object" method.

Thanks to @RunOrVeith for reporting this issue.
@Kami
Copy link
Member Author

Kami commented Jan 22, 2021

I'll go ahead and merge this since I hope to start voting thread for a bug fix release today.

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

Successfully merging this pull request may close these issues.

None yet

1 participant