Skip to content

Encode the pound/hash/number symbol (#) #48

Description

@Ansis100

The URL code for # is %23. When a WebDAV server receives a URL containing a literal #, it ignores everything after the symbol (e.g. http://host.com/file#1234.txt becomes http://host.com/file), presumably because # is reserved for HTML anchors.

Now, webdav_client uses Uri.encodeFull to encode URLs. From the docs:

All characters except uppercase and lowercase letters, digits and the characters !#$&'()*+,-./:;=?@_~ are percent-encoded.

This means that if any method from webdav_client receives a file path containing the symbol #, it will not encode it and the server will receive a truncated request URL, which results in unexpected behaviour.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions