Skip to content

Calling stat request on directory path caused 301 Moved Permanently #290

Description

@bitrevo

My project need to create directories on webdav server and the createDirectory do not work with recursive option because of the CORS preflight request.

For example, a recursive call to create a path /a/b/c, multiple stat requests are made to defect if the directory /a and /a/b are exists.

The library send out the request with the path /a instead of /a/ which caused webdav server responses 301 Moved Permanently, it is expected behavior regarding the MDN doc (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSExternalRedirectNotAllowed).

Is it make sense to fix the createDirectory API call by add the ending slash to the stat request to avoid the CORS error?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions