-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange work with DestLockToken in Copy() #55
Comments
Update: It is difficult to make error with, but seems that something works wrong with lock token. And yet another problem was deleting locked file with proper lock token in bytemark/webdav (with default settings), same error was occured, but IIS WebDAV worked fine. |
Hi @Chebura , The lib supports only a subset of the spec which is not enough to make lock tokens work for the COPY method and maybe in some other cases. The only work around is to set the correct value in the var copyParams = new CopyParameters
{
Headers = new List<KeyValuePair<string, string>>
{
new KeyValuePair<string, string>(
"If",
$"<absolute_uri_to_dest_resource> (<opaquelocktoken>)"
)
}
}; The library supports only passing a token in the no-tag form ( I'll consider re-visiting the implementation of lock tokens in the lib to support everything that is currently left out: tagged-list form, multiple tokens, etags, negation etc. Thanks for submitting the issue it reveals quite important overlook in the implementation. |
Hi, |
Hi, I try to use Copy with DestLockToken (with overwrite option). Firstly, I create lock token for destination file (via Lock, that creates new empty locked file) and then specify this in DestLockToken, call Copy(), then obtain Precondition Failed 412. It is strange, because I have actual lock token for file. Same trick works for PutFile(), where I lock rewritable file (even it is does not exists) and use this lock token for writing data. My WebDAV server bytemark/webdav logs that header "If:" was received but resource not found.
.net core 3.1
Thank you for attention
The text was updated successfully, but these errors were encountered: