Repository navigation
fix(storage): make empty-bucket resource URI path formatting consistent with path-style formatting - #15277
Open
nidhiii-27 wants to merge 1 commit into
Open
fix(storage): make empty-bucket resource URI path formatting consistent with path-style formatting#15277nidhiii-27 wants to merge 1 commit into
nidhiii-27 wants to merge 1 commit into
Conversation
…nt with path-style formatting StorageImpl.constructResourceUriPath now always prepends a path delimiter to non-empty object names when the bucket segment is empty, matching the path-style formatting branch. StorageImpl.signUrl and SignatureInfo also pass the formatted resource path string directly during URL assembly and signing while keeping the existing public URI-based SignatureInfo API and path-style signed URL behavior unchanged. Added unit test coverage in StorageImplMockitoTest and SignatureInfoTest. [Generated-by: AI]
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the signed URL generation logic to preserve leading slashes in object names by passing the canonicalized resource as a String instead of parsing it into a URI, which would otherwise strip duplicate slashes. Corresponding unit tests have been added to verify this behavior. A review comment highlights that passing null for the URI in the new builder method is a breaking change for the public API getCanonicalizedResource() and suggests attempting to parse the string into a URI with a fallback to null to maintain backward compatibility.
nidhiii-27
marked this pull request as ready for review
November 29, 2026 19:51
This branch has not been deployed
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.
StorageImpl.constructResourceUriPath now always prepends a path delimiter to non-empty object names when the bucket segment is empty, matching the path-style formatting branch. StorageImpl.signUrl and SignatureInfo also pass the formatted resource path string directly during URL assembly and signing while keeping the existing public URI-based SignatureInfo API and path-style signed URL behavior unchanged. Added unit test coverage in StorageImplMockitoTest and SignatureInfoTest.