Skip to content

HTML URL encoding problems (files get skipped) #1573

Closed

Description

@qw3rty2017

What is your rclone version (eg output from rclone -V)
rclone v1.37-041-g21aca686β
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Ubuntu 17.04, 64 bit
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 ls test:" or "rclone copy test: /tmp"

Filenames containing characters like ":" (encoded as "%3a") or "%" ("Now 100% better.mp3") cause the latest rclone beta to skip these files. (rclone v1.37 crashes as discussed in #1555)

It would be great if rclone could replace these characters with something like underscore.

Activity

  1. ncw commented on Aug 1, 2017

    @ncw
    Member

    Does the html in the index page say something like this?

    <a href="Now 100% better.mp3">Now 100% better.mp3</a>

    Can you check the page, or even better link it?

    That isn't stricly speaking legal HTML I think, though it is pretty common practice so rclone should probably deal with it.

    I got this from the w3c validator when I tried the above

    Bad value Now 100% better.mp3 for attribute href on element a: Illegal character in path segment: space is not allowed.

  2. qw3rty2017 commented on Aug 1, 2017

    @qw3rty2017
    Author

    I reproduced it using Apache 2.4.25:

    The directory:
    user@ubuntu:/var/www/html/Percent$ ls
    Now 100% better.mp3 Now better.mp3

    The HTML document:
    ...
    <tr><td valign="top"><img src="/icons/back.gif" alt="[PARENTDIR]"></td><td><a href="/">Parent Directory</a></td><td>&nbsp;</td><td align="right"> - </td><td>&nbsp;</td></tr>
    <tr><td valign="top"><img src="/icons/sound2.gif" alt="[SND]"></td><td><a href="Now%20100%25%20better.mp3">Now 100% better.mp3</a></td><td align="right">2017-08-01 11:41 </td><td align="right"> 0 </td><td>&nbsp;</td></tr>
    <tr><td valign="top"><img src="/icons/sound2.gif" alt="[SND]"></td><td><a href="Now%20better.mp3">Now better.mp3</a></td><td align="right">2017-08-01 11:41 </td><td align="right"> 0 </td><td>&nbsp;</td></tr>
    ...

    The rclone output:
    user@ubuntu:~/rclone-v1.37-041-g21aca686β-linux-amd64$ ./rclone -v ls test:Percent
    2017/08/01 14:35:09 INFO : http://127.0.0.1/Percent/: Modify window is 1s
    0 Now better.mp3
    user@ubuntu:~/rclone-v1.37-041-g21aca686β-linux-amd64$

    A different example (colon), probably not Apache

    <a href="Year%202017%3a%20New%20Era.mp4">Year 2017: New Era.mp4</a> 01-Jul-2017 12:00 538113236

  3. ncw commented on Aug 1, 2017

    @ncw
    Member

    Thanks, that is really useful. This looks like a bug...

    I'll fix tomorrow and post a beta for you to try.

  4. added this to the v1.38 milestone on Aug 1, 2017
  5. ncw commented on Aug 2, 2017

    @ncw
    Member

    Here is a beta which should fix the issue. Please re-open if it doesn't.

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

    Thanks

  6. qw3rty2017 commented on Aug 2, 2017

    @qw3rty2017
    Author

    It works! Thank you.

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