Skip to content

http backend does not work with remote url with colon (":") in it #1555

Closed

Description

@fbartels

Hi,

I just updated to the 1.37 release and wanted to try the new http backend. Unfortunately it does not seem to be able to work with url that have a ":" in it.

What is your rclone version (eg output from rclone -V)

rclone v1.37

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 16.04

Which cloud storage system are you using? (eg Google Drive)

http

The command you were trying to run (eg rclone copy /tmp remote:tmp)

RCLONE_CONFIG_ZZ_TYPE=http RCLONE_CONFIG_ZZ_URL=https://download.kopano.io/community rclone lsd zz:"olextension:/sourcecode"

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

$ RCLONE_CONFIG_ZZ_TYPE=http RCLONE_CONFIG_ZZ_URL=https://download.kopano.io/community rclone -vv lsd "zz:olextension:/sourcecode"
2017/07/25 08:30:50 DEBUG : rclone: Version "v1.37" starting with parameters ["rclone" "-vv" "lsd" "zz:olextension:/sourcecode"]
2017/07/25 08:30:50 INFO  : olextension:///sourcecode/: Modify window is 1s
2017/07/25 08:30:50 ERROR : : error listing: error listing "": failed to readDir: Get olextension:///sourcecode/: unsupported protocol scheme "olextension"
2017/07/25 08:30:50 Failed to lsd: error listing "": failed to readDir: Get olextension:///sourcecode/: unsupported protocol scheme "olextension"

Activity

  1. qw3rty2017 commented on Jul 25, 2017

    @qw3rty2017

    First of all, I would like to thank you for adding http.

    I also ran across this issue:

    2017/07/25 15:23:28 ERROR : Error parsing "Some: file.avi" as URL: parse Some: file.avi: first path segment in URL cannot contain colon panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x64ce36]

  2. ncw commented on Jul 26, 2017

    @ncw
    Member

    Was there a backtrace for the above error?

    I'll examine the http parsing code and see if I can fix.

  3. added this to the v1.38 milestone on Jul 26, 2017
  4. qw3rty2017 commented on Jul 26, 2017

    @qw3rty2017

    There was this:

    goroutine 74 [running]: net/url.(*URL).ResolveReference(0xc420366f80, 0x0, 0xe521f2) /opt/go/go1.8/src/net/url/url.go:944 +0x36 github.com/ncw/rclone/http.urlJoin(0xc420366f80, 0xc4213ad090, 0x44, 0x44) /home/ncw/go/src/github.com/ncw/rclone/http/http.go:71 +0x15c github.com/ncw/rclone/http.parseName(0xc420366f80, 0xc4203b2060, 0x5a, 0xc420425d98, 0x19, 0xc420422001) /home/ncw/go/src/github.com/ncw/rclone/http/http.go:203 +0x6c github.com/ncw/rclone/http.parse.func1(0xc4203c6850) /home/ncw/go/src/github.com/ncw/rclone/http/http.go:243 +0x18d github.com/ncw/rclone/http.parse.func1(0xc4200fe620) /home/ncw/go/src/github.com/ncw/rclone/http/http.go:252 +0x147 github.com/ncw/rclone/http.parse.func1(0xc4200fe230) /home/ncw/go/src/github.com/ncw/rclone/http/http.go:252 +0x147 github.com/ncw/rclone/http.parse.func1(0xc420069dc0) /home/ncw/go/src/github.com/ncw/rclone/http/http.go:252 +0x147 github.com/ncw/rclone/http.parse.func1(0xc420069d50) /home/ncw/go/src/github.com/ncw/rclone/http/http.go:252 +0x147 github.com/ncw/rclone/http.parse(0xc420366f80, 0x7f587aee8070, 0xc420252f60, 0xc420422000, 0x114, 0x200, 0x1, 0x2) /home/ncw/go/src/github.com/ncw/rclone/http/http.go:255 +0x109 github.com/ncw/rclone/http.(*Fs).readDir(0xc420048500, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /home/ncw/go/src/github.com/ncw/rclone/http/http.go:278 +0x40f github.com/ncw/rclone/http.(*Fs).List(0xc420048500, 0x0, 0x0, 0x23c5af60abf35866, 0x211c785bbf036416, 0x2321e875753bc470, 0x42909f, 0xc420392eb8) /home/ncw/go/src/github.com/ncw/rclone/http/http.go:301 +0xc3 github.com/ncw/rclone/fs.ListDirSorted(0x13127c0, 0xc420048500, 0x428b00, 0x0, 0x0, 0x5b58bde44247ec4b, 0x737b23, 0xc420392f48, 0xc420392f40, 0xc421395e40) /home/ncw/go/src/github.com/ncw/rclone/fs/operations.go:615 +0x63 github.com/ncw/rclone/fs.(*syncCopyMove).makeListDir.func1(0x0, 0x0, 0xc420251520, 0x20928a380e9d26ed, 0xded2fec780d6edb6, 0x26ddd19f8ba589da, 0x7aa4910eef10a1c9) /home/ncw/go/src/github.com/ncw/rclone/fs/sync.go:134 +0x53 github.com/ncw/rclone/fs.(*syncCopyMove)._run.func1(0xc420251520, 0xc420242680, 0xc420251500, 0xc4203369c0, 0x0, 0x0, 0x7ffffffe, 0x7ffffffe, 0x0) /home/ncw/go/src/github.com/ncw/rclone/fs/sync.go:923 +0x72 created by github.com/ncw/rclone/fs.(*syncCopyMove)._run /home/ncw/go/src/github.com/ncw/rclone/fs/sync.go:924 +0x987

  5. ncw commented on Jul 30, 2017

    @ncw
    Member

    Can you try this fix - I think it may fix your issue too.

    https://beta.rclone.org/v1.37-038-gb0fd187c/ (uploaded in 15-30 mins)

  6. fbartels commented on Jul 31, 2017

    @fbartels
    Author

    Hi @ncw ,

    thanks for the upload. at least for me this upload does not change the error:

    $ rclone -V
    rclone v1.37-038-gb0fd187cβ
    $ RCLONE_CONFIG_ZZ_TYPE=http RCLONE_CONFIG_ZZ_URL=https://download.kopano.io/community rclone -vv lsd zz:"olextension:/sourcecode"
    2017/07/31 09:19:18 DEBUG : rclone: Version "v1.37-038-gb0fd187cβ" starting with parameters ["rclone" "-vv" "lsd" "zz:olextension:/sourcecode"]
    2017/07/31 09:19:18 INFO  : olextension:///sourcecode/: Modify window is 1s
    2017/07/31 09:19:18 ERROR : : error listing: error listing "": failed to readDir: Get olextension:///sourcecode/: unsupported protocol scheme "olextension"
    2017/07/31 09:19:18 Failed to lsd: error listing "": failed to readDir: Get olextension:///sourcecode/: unsupported protocol scheme "olextension"
    
  7. qw3rty2017 commented on Jul 31, 2017

    @qw3rty2017

    Thanks! I don't get the error anymore but the file containing the problematic symbol gets skipped. Could you change it to remove or replace problematic symbols? (There might be more)

  8. ncw commented on Jul 31, 2017

    @ncw
    Member

    @qw3rty2017 any chance you could cut and paste the HTML from the web page with the directory listing so I can see exactly what it says?

  9. added a commit that references this issue on Jul 31, 2017
  10. ncw commented on Jul 31, 2017

    @ncw
    Member

    @fbartels I've fixed your issue in this change - can you take a look please

    https://beta.rclone.org/v1.37-039-g2b5ce6ef/ (uploaded in 15-30 mins)

    Thanks

  11. ncw commented on Jul 31, 2017

    @ncw
    Member

    @qw3rty2017 Can you put that extra info into a new issue please? Then we can keep one issue per problem! Thanks.

  12. ncw commented on Aug 7, 2017

    @ncw
    Member

    This should all be fixed now - please try the latest beta and re-open if not.

  13. fbartels commented on Aug 7, 2017

    @fbartels
    Author

    Thanks, just retried with the latest beta. Problem is fixed for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions