Skip to content

WebDAV mixes root directory & endpoint path in different ways for different requests #4175

@AJIOB

Description

@AJIOB

URL/URI part names can be found here.

As I can see, current version 0.45.0 uses endpoint's path part.

In the WebdavConfig we have:

  • endpoint with the path
  • root with the another path

After the fn build call, WebdavBackend contains:

  • endpoint field with the config's endpoint value: scheme, authority, path, query & fragment
  • base_dir field with the only path value from the endpoint
  • root with the config's root value (and config value is ALWAYS cleaned up, while another values are not, WHY?. Maybe we need to use .clone() instead of .take()? - additional point 1)

On the next, WebdavBackend's fields are used as:

  • endpoint - for the path force concatenation (need to recheck fn webdav_put()'s abs_path input value, maybe it is already starts with the / - additional point 2)
  • base_dir - for creating WebdavLister in the fn list(). WebdavLister::new() uses both base_dir & root values, but not the endpoint one, WHY? - additional point 3
  • root - for:
    • AccessorInfo creation
    • creating WebdavLister in the fn list() (together with the base_dir)
    • creating WebdavWriterin the fb write()
    • full path build in the lots of functions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions