Skip to content

Commit

Permalink
debug url variations
Browse files Browse the repository at this point in the history
  • Loading branch information
ddowker committed Jun 5, 2024
1 parent dd7569c commit c18011e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions broker/client/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ 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 != "" {
log.WithFields(log.Fields{
"FragmentUrl": r.Response.FragmentUrl,
}).Info("reader handle FragmentUrl")
if TransformSignedURLs {
var fragURL *url.URL
if fragURL, err = url.Parse(r.Response.FragmentUrl); err != nil {
Expand Down
4 changes: 4 additions & 0 deletions broker/fragment/store_gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func (s *gcsBackend) SignGet(ep *url.URL, fragment pb.Fragment, d time.Duration)
}

if DisableSignedUrls {
log.WithFields(log.Fields{
"ep": fmt.Sprintf("%v", *ep),
"fragment": fmt.Sprintf("%v", fragment),
}).Info("signGet disable signed urls")
u := &url.URL{
Path: fmt.Sprintf("/%s/%s", cfg.bucket, cfg.rewritePath(cfg.prefix, fragment.ContentPath())),
}
Expand Down

0 comments on commit c18011e

Please sign in to comment.