Re: How to do a MoveMethod with locks
Stephen Martin <[email protected]> Tue, 24 Apr 2007 18:13:50 -0400
| Newsgroups | gmane.comp.jakarta.slide.user |
|---|---|
| Message-ID | <[email protected]> |
In answer to my own question, I discovered that the If: header seemed to be incorrect or at least unacceptable to mod_dav/mod_svn. There are two forms of this header, one that includes the URL of the request and one that does not. The rfc is unclear (at least to me) on which of these forms is required for MOVE, but providing the URL made it work for me when the source file for the MOVE was locked. I've attached a patch, that modifies WebdavResource to provide the longer form of the header. Stephen Martin wrote: > I'm having trouble making a moveMethod request on a resource that I > have locked. My research leads > me to believe that I have to also lock the destination of the move > which I have done but when I try > to perform the move I get an error. I suspect that I have to somehow > add the lockToken for the > destination to the moveMethod request. > > Can someone explain how this is done, or better yet point me to some > example code that does > the job? > -- Stephen Martin [email protected] 80 Hunterdon Blvd. www.vanderfleet-martin.net Murray Hill, NJ USA, 07974 (908) 790-9070
WebdavResource.patch
(text/x-patch, 746 B)
*** WebdavResource.java 2007-04-24 13:23:12.000000000 -0400
--- WebdavResource.java.orig 2007-04-24 13:22:06.000000000 -0400
***************
*** 834,842 ****
if (lockTokens.length == 0) return;
StringBuffer ifHeaderValue = new StringBuffer();
- ifHeaderValue.append("<" + httpURL.toString() + "> ");
! for (int i = 0; i < lockTokens.length; i++) {
ifHeaderValue.append("(<").append(lockTokens[i]).append(">) ");
}
--- 834,841 ----
if (lockTokens.length == 0) return;
StringBuffer ifHeaderValue = new StringBuffer();
! for (int i = 0; i < lockTokens.length; i++) {
ifHeaderValue.append("(<").append(lockTokens[i]).append(">) ");
}
smime.p7s
(application/x-pkcs7-signature, 3.2 KB) - not displayed