Skip to content

Destination webdav header missing slash #3559

Open
@mnutt

Description

I'm running into an issue when using the Destination header to move a file. I might send something like this in the request header:

Destination: http://ui-dedd82ceddacee6aafced10c1fbe0c7b.local.sandstorm.io:6090/dav/asdfafsd/shuttle.jpg

However, when I log the destination header inside of the grain server I get: http://ui-dedd82ceddacee6aafced10c1fbe0c7b.local.sandstorm.io:6090dav/asdfafsd/shuttle.jpg (note the missing slash after the port)

It looks like it is due to this line:

// Remove leading '/'.
return kj::str(dest.slice(1));

...which seems very deliberate, so I didn't want to go ahead and make a PR without understanding why we might be removing the leading slash here? Constructing the header is just joining [basePath, destination] and the basePath has no trailing slash.

This is not an urgent issue, as for the time being I can just subtract the x-sandstorm-base-path to get the destination pathname, and add the leading slash if necessary.

Metadata

Assignees

No one assigned

    Labels

    app-platformApp/Sandstorm integration featuresbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions