Skip to content

fix(storage): send_buffered() fails for some object sizes#3616

Merged
coryan merged 2 commits intogoogleapis:mainfrom
coryan:fix-storage-upload-with-multiple-of-size
Oct 22, 2025
Merged

fix(storage): send_buffered() fails for some object sizes#3616
coryan merged 2 commits intogoogleapis:mainfrom
coryan:fix-storage-upload-with-multiple-of-size

Conversation

@coryan
Copy link
Copy Markdown
Collaborator

@coryan coryan commented Oct 22, 2025

If the upload size is unknown and the stream is closed at a multiple of the buffer size the client library needs to send a final PUT request without a payload. The Content-Range header was not formatted correctly in this case.

Fixes #3608

If the upload size is unknown and the stream is closed at a multiple of the
buffer size the client library needs to send a final `PUT` request without a
payload. The `Content-Range` header was not formatted correctly in this case.
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Oct 22, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.00%. Comparing base (59d1859) to head (eaff6c0).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3616      +/-   ##
==========================================
+ Coverage   95.98%   96.00%   +0.01%     
==========================================
  Files         125      125              
  Lines        5027     5027              
==========================================
+ Hits         4825     4826       +1     
+ Misses        202      201       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coryan coryan marked this pull request as ready for review October 22, 2025 20:04
@coryan coryan requested a review from a team October 22, 2025 20:04
Copy link
Copy Markdown
Member

@dbolduc dbolduc left a comment

Choose a reason for hiding this comment

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

The fix is good, but the PR needs some clean ups.

@coryan coryan enabled auto-merge (squash) October 22, 2025 20:27
@coryan coryan merged commit c6227fc into googleapis:main Oct 22, 2025
27 checks passed
@coryan coryan deleted the fix-storage-upload-with-multiple-of-size branch October 22, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Malformed header in ResumableUpload when ObjectSize is multiple of Buffer size and no size hint is provided

2 participants