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 get_object not working with binary files #534

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

stanhu
Copy link
Contributor

@stanhu stanhu commented Jun 23, 2021

The change in #521 caused the Tempfile buffer to be used, which opens
a file in ASCII mode by default. We need to make use of binmode to
activate binary streams.

Closes #533

@stanhu
Copy link
Contributor Author

stanhu commented Jun 23, 2021

@geemus @Temikus Would you mind reviewing this? This is a pretty serious bug.

The change in fog#521 caused the `Tempfile` buffer to be used, which opens
a file in ASCII mode by default. We need to make use of `binmode` to
activate binary streams.
@stanhu stanhu force-pushed the sh-fix-get-object-binmode branch from 1ff0f38 to f27a861 Compare June 23, 2021 18:57
Copy link
Member

@geemus geemus left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the quick fix!

@geemus geemus merged commit d0741c3 into fog:master Jun 24, 2021
@geemus
Copy link
Member

geemus commented Jun 24, 2021

Fix released in v1.15.0.

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.

GCS get_object fails with charcode conversion error
2 participants