Skip to content

Commit

Permalink
name cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ddowker committed Jun 5, 2024
1 parent b73ffdc commit f6ff841
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions broker/client/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ func (r *Reader) Read(p []byte) (n int, err error) {
// If the frame preceding EOF provided a fragment URL, open it directly.
if !r.Request.MetadataOnly && r.Response.Status == pb.Status_OK && r.Response.FragmentUrl != "" {
if TransformSignedURLs {
var url *url.URL
if url, err = url.Parse(r.Response.FragmentUrl); err != nil {
var fragURL *url.URL
if fragURL, err = url.Parse(r.Response.FragmentUrl); err != nil {
return 0, err

}
if url.Scheme != "gs" {
if fragURL.Scheme != "gs" {
return 0, fmt.Error("TransformSignedURLs is only supported for GCS")
}
if r.direct, err = gcs.OpenWithOffset(r.ctx, r.Response.FragmentUrl,
if r.direct, err = gcs.OpenWithOffset(r.ctx, fragURL,
*r.Response.Fragment, r.Request.Offset); err == nil {
n, err = r.Read(p) // Recurse to attempt read against opened |r.direct|.
}
Expand Down

0 comments on commit f6ff841

Please sign in to comment.