Skip to content

omit accept-encoding from upload#59

Open
shubhangi-google wants to merge 4 commits intomainfrom
remove_accept_encoding_gzip
Open

omit accept-encoding from upload#59
shubhangi-google wants to merge 4 commits intomainfrom
remove_accept_encoding_gzip

Conversation

@shubhangi-google
Copy link
Copy Markdown
Owner

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea.
  • Follow the instructions in CONTRIBUTING. Most importantly, ensure the tests and linter pass by running bundle exec rake ci in the gem subdirectory.
  • Update code documentation if necessary.

closes: #<issue_number_goes_here>

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the handling of the Accept-Encoding: gzip header, moving it from a global service-level configuration to a specific per-request header for downloads. This change prevents potential parsing errors during file uploads where gzipped metadata might be returned. The PR includes updated documentation, new acceptance tests, and modified unit tests to verify the header's behavior. Feedback was provided to avoid in-place mutation of the options hash to prevent potential FrozenError exceptions.

Comment thread google-cloud-storage/lib/google/cloud/storage/service.rb Outdated
@shubhangi-google
Copy link
Copy Markdown
Owner Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the google-cloud-storage library to move the Accept-Encoding: gzip header from a global request option to a specific option for file downloads. This ensures that the header is omitted during file uploads while maintaining it for downloads. The changes include updates to the service initialization, the download_file method, documentation, and a comprehensive set of unit and acceptance tests to verify the new behavior. I have no feedback to provide.

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.

2 participants