Re: delete & unlock on previously locked resources

Evert | Rooftop <[email protected]>
Newsgroups gmane.ietf.webdav
Message-ID <[email protected]>
On 5-Nov-08, at 4:09 AM, Julian Reschke wrote:

>
> Evert | Rooftop wrote:
>> Hi Guys,
>> Litmus 0.12 added tests for locking unmapped urls. One of the tests  
>> is failing for me, and I have a feeling it might be a bug in  
>> litmus, so I wanted to ask here..
>> test 38: unmapped_lock
>> * LOCK /litmus/unmapped_url (i respond with 201 Created)
>> * DELETE /litmus/unmapped_url (i respond with 204 No Content)
>> test 39: unlock
>> * UNLOCK /litmus/unmapped_url
>> I fail the last unlock with 412 Precondition failed
>> ...
>
> Shouldn't that be a 404?
>
> Please post the full trace (a 412 is only correct if there's a  
> conditional header involved).
>
> BR, Julian
>

A 404 makes more sense, but that also made the litmus test fail. Here  
are the relevant headers (took out the unneeded stuff)

LOCK /litmus/unmapped_url HTTP/1.1
Depth: 0
Timeout: Second-3600

<?xml version="1.0" encoding="utf-8"?>
<lockinfo xmlns='DAV:'>
   <lockscope><exclusive/></lockscope>
   <locktype><write/></locktype><owner>litmus test suite</owner>
</lockinfo>

HTTP/1.1 201 Created
Lock-Token: opaquelocktoken:44445502-4fdd-85ab-b7ea-4f2b040acaac
<?xml version="1.0" encoding="UTF-8"?>
<d:prop xmlns:d="DAV:">
   <d:lockdiscovery>
     <d:activelock>
      <d:lockscope><d:exclusive /></d:lockscope>
      <d:locktype><d:write /></d:locktype>
      <d:depth>0</d:depth>
      <d:timeout>Second-1800</d:timeout>
      <d:locktoken>
       <d:href>opaquelocktoken:44445502-4fdd-85ab-b7ea-4f2b040acaac</ 
d:href>
      </d:locktoken>
      <d:owner>litmus test suite</d:owner>
     </d:activelock>
   </d:lockdiscovery>
</d:prop>

DELETE /litmus/unmapped_url HTTP/1.1
If: <http://sabredav.evertpot.com/litmus/unmapped_url>  
(<opaquelocktoken:44445502-4fdd-85ab-b7ea-4f2b040acaac>)

HTTP/1.1 204 No Content


Now test 39 starts:

UNLOCK /litmus/unmapped_url HTTP/1.1
Lock-Token: <opaquelocktoken:44445502-4fdd-85ab-b7ea-4f2b040acaac>

I both tried responding with a 404, and a 412. Both fail the litmus  
test. Would 404 be the appropriate response code here?

Evert
smime.p7s (application/pkcs7-signature, 2.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.