fix(server): Return 200 instead of 204 for object HEAD requests - #577
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
jan-auer
marked this pull request as ready for review
July 27, 2026 11:54
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 44bf616. Configure here.
jan-auer
commented
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

A
HEADon an existing object now responds with200 OKand the metadata headers instead of204 No Content. Callers that branch on the status code no longer have to special-caseHEADagainst the200thatGETreturns for the same resource.Additionally, GET responses now return the
content-lengthinstead of streaming with chunked transfer encoding.This aligns with RFC 9110 §9.3.2, which specifies that a
HEADresponse should carry the same status and header fields as the equivalentGET, minus the body, and with what both S3HeadObjectand the GCS XML API do. It also unblocks exposing the object size onHEADlater:204responses are forbidden from carryingContent-Length, so the old status permanently foreclosed the cheapest way for a client to learn an object's size.Also fixes the S3-compatible backend reporting a size of zero for metadata-only lookups, since it read the decoded body length rather than the
Content-Lengthheader.