Subject: delete & unlock on previously locked resources

From: Evert | Rooftop <[email-masked]>
Date: Tue, 4 Nov 2008 22:10:17 -0500

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

Would 412 be the correct response in this case?

Thanks!
Evert

---

From: Julian Reschke <[email-masked]>
Date: Wed, 05 Nov 2008 10:09:32 +0100

Evert | Rooftop wrote:
> ...

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

---

From: Evert | Rooftop <[email-masked]>
Date: Wed, 5 Nov 2008 10:19:27 -0500

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

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

---

From: Joe Orton <[email-masked]>
Date: Wed, 5 Nov 2008 15:26:14 +0000

> failing for me, and I have a feeling it might be a bug in litmus, so I  

Hiya, yes, this is a litmus bug; it'll be fixed for the next release; 
see this thread:

http://lists.manyfish.co.uk/pipermail/litmus/2008-October/000009.html

Regards, Joe

---

From: Evert | Rooftop <[email-masked]>
Date: Wed, 5 Nov 2008 10:29:21 -0500

Thanks a lot Joe, so just to confirm.. The appropriate response would  
be 404 here, right?

Evert

On 5-Nov-08, at 10:26 AM, Joe Orton wrote:

>> is

---

From: Julian Reschke <[email-masked]>
Date: Wed, 05 Nov 2008 16:38:03 +0100

> http://lists.manyfish.co.uk/pipermail/litmus/2008-October/000009.html

I see. Yes, that's a bug.

I missed that there was a new release :-)

BR, Julian