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:
sandstorm/src/sandstorm/web-session-bridge.c++
Lines 463 to 464 in 9e77d99
...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.