Skip to content

fix: include blob attribute headers on range responses#3084

Merged
wbbradley merged 1 commit intomainfrom
wbbradley/blob-attributes
Apr 14, 2026
Merged

fix: include blob attribute headers on range responses#3084
wbbradley merged 1 commit intomainfrom
wbbradley/blob-attributes

Conversation

@wbbradley
Copy link
Copy Markdown
Contributor

@wbbradley wbbradley commented Mar 7, 2026

Description

In get_blob_by_object_id, blob attribute headers (Content-Type, custom headers, etc.) were only added when the response status was exactly 200 OK. Range requests return 206 Partial Content, so all attribute headers were silently dropped. Changed the check from == StatusCode::OK to .is_success() to cover all 2xx statuses.

Test plan

  • Verified the fix compiles cleanly via chk (formatting, clippy, test compilation).
  • Ran the full walrus-service test suite (511 tests pass).

Release notes

  • Storage node:
  • Aggregator: Blob attribute headers (such as Content-Type) are now correctly included on range request responses when reading blobs by object ID.
  • Publisher:
  • CLI:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 7, 2026

Warning: This PR modifies the Walrus CLI. Please consider the following:

  • Make sure the changes are backwards compatible. Consider deprecating options before
    removing them.
  • Generally only use long CLI options, not short ones to avoid conflicts in the
    future.
  • If you added new options or features, or modified the behavior, please document the
    changes in the release notes of the PR and update the documentation in the
    docs/content directory.

@wbbradley wbbradley force-pushed the wbbradley/blob-attributes branch from 178e1ae to f55a04d Compare March 7, 2026 22:36
The object-ID endpoint only added blob attribute headers (Content-Type,
custom headers) when the response status was exactly 200 OK. Range
requests return 206 Partial Content, so attributes were silently dropped.
Use is_success() to cover all 2xx statuses while still skipping errors.

Add a regression test that verifies attribute headers are present on 206
responses from get_blob_by_object_id with a Range request header.
@wbbradley wbbradley force-pushed the wbbradley/blob-attributes branch from f55a04d to 09301c3 Compare March 7, 2026 22:38
Copy link
Copy Markdown
Collaborator

@halfprice halfprice left a comment

Choose a reason for hiding this comment

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

LGTM!

@wbbradley wbbradley removed the request for review from sadhansood April 14, 2026 18:46
@wbbradley wbbradley merged commit 39b1ef1 into main Apr 14, 2026
26 checks passed
@wbbradley wbbradley deleted the wbbradley/blob-attributes branch April 14, 2026 20:05
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