cmd/stripes: fetch plain http(s) URLs directly so root URLs and redirects work#45
Open
achille-roussel wants to merge 1 commit into
Open
cmd/stripes: fetch plain http(s) URLs directly so root URLs and redirects work#45achille-roussel wants to merge 1 commit into
achille-roussel wants to merge 1 commit into
Conversation
…ects work `stripes http://host/` failed with "invalid object key ()": tigerblock's storage layer models http(s) as an S3-style object store keyed by the request path, so a root URL (empty key) was rejected before any request was made — and the storage path never followed the server's redirect. Route http(s):// arguments through a direct net/http GET instead. This works for keyless root URLs, follows redirects, and renders the final response, while honouring the auth transport installed for --basic-auth / --bearer-token. Every other scheme (s3, gs, file, …) and bare paths still go through tigerblock storage. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
stripesfetches inputs throughtigerblock'sstorage.GetObject, which modelshttp(s)as an S3-style object store keyed by the request path. Forhttp://localhost:8080/the object key is empty (the path is just/), so the storage layer rejects it withinvalid object key ()— before any HTTP request is made. As a result the server's302redirect was never issued or followed either.Fix
Route
http(s)://arguments through a directnet/httpGET (openInput/fetchHTTP) instead of the object-store abstraction. This:http://host/),Content-Type/Content-Encodingfor format detection,--basic-auth/--bearer-token,Every other scheme (
s3,gs,file, …) and bare filesystem paths continue to go throughtigerblockstorage unchanged.Tests
testdata/script/remote_http_root_redirect.txtarhits a root URL that302-redirects to a JSON endpoint and asserts the rendered body./(302) and/redirected/data.jsonhandlers.🤖 Generated with Claude Code