@@ -197,7 +197,6 @@ func resolveEndpoint(ctx context.Context, srv *rest.Client, pacer *fs.Pacer, opt
197197 return resolveZenodoEndpoint (ctx , srv , pacer , resolvedURL , opt .Doi )
198198 }
199199
200- // TODO: improve auto-detect
201200 hostname := strings .ToLower (resolvedURL .Hostname ())
202201 if hostname == "dataverse.harvard.edu" || activateDataverse (resolvedURL ) {
203202 return resolveDataverseEndpoint (resolvedURL )
@@ -293,8 +292,6 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
293292 CanHaveEmptyDirectories : true ,
294293 }).Fill (ctx , f )
295294
296- fs .Logf (f , "name = '%s', root = '%s'" , name , root )
297-
298295 isFile , err := f .httpConnection (ctx , opt )
299296 if err != nil {
300297 return nil , err
@@ -361,8 +358,6 @@ func (f *Fs) Rmdir(ctx context.Context, dir string) error {
361358
362359// NewObject creates a new remote http file object
363360func (f * Fs ) NewObject (ctx context.Context , remote string ) (fs.Object , error ) {
364- fs .Logf (nil , "remote = %s" , remote )
365-
366361 var entries []* Object
367362 var err error
368363 switch f .provider {
@@ -379,7 +374,6 @@ func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error) {
379374
380375 for _ , entry := range entries {
381376 if entry .Remote () == remote {
382- fs .Logf (nil , "Found: %s -> %s" , entry .Remote (), entry .contentURL )
383377 return entry , nil
384378 }
385379 }
@@ -477,23 +471,14 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Read
477471 RootURL : o .contentURL ,
478472 Options : options ,
479473 }
480- fs .Logf (o , "Open with URL = '%s'" , o .contentURL )
481- for _ , opt := range opts .Options {
482- k , v := opt .Header ()
483- fs .Logf (o , "header '%s' = '%s'" , k , v )
484- }
485474 var res * http.Response
486475 err = o .fs .pacer .Call (func () (bool , error ) {
487476 res , err = o .fs .srv .Call (ctx , & opts )
488477 return shouldRetry (ctx , res , err )
489478 })
490479 if err != nil {
491- fs .Logf (o , "Open failed: '%s'" , res .Status )
492- fs .Logf (o , "Open failed: '%s'" , err .Error ())
493480 return nil , fmt .Errorf ("Open failed: %w" , err )
494481 }
495- fs .Logf (o , "Open response: '%s'" , res .Status )
496- fs .Logf (o , "Open response: '%v'" , res .Header )
497482
498483 // Handle non-compliant redirects
499484 if res .Header .Get ("Location" ) != "" {
@@ -505,12 +490,8 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Read
505490 return shouldRetry (ctx , res , err )
506491 })
507492 if err != nil {
508- fs .Logf (o , "Open failed: '%s'" , res .Status )
509- fs .Logf (o , "Open failed: '%s'" , err .Error ())
510493 return nil , fmt .Errorf ("Open failed: %w" , err )
511494 }
512- fs .Logf (o , "Open response: '%s'" , res .Status )
513- fs .Logf (o , "Open response: '%v'" , res .Header )
514495 }
515496 }
516497
0 commit comments