delete & unlock on previously locked resources

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

delete & unlock on previously locked resources

evert (Bugzilla)
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

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: delete & unlock on previously locked resources

Julian Reschke

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

Reply | Threaded
Open this post in threaded view
|

Re: delete & unlock on previously locked resources

evert (Bugzilla)
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 (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: delete & unlock on previously locked resources

Joe Orton-2
In reply to this post by evert (Bugzilla)

On Tue, Nov 04, 2008 at 10:10:17PM -0500, Evert | Rooftop wrote:
> 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..

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

Reply | Threaded
Open this post in threaded view
|

Re: delete & unlock on previously locked resources

evert (Bugzilla)
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:

>
> On Tue, Nov 04, 2008 at 10:10:17PM -0500, Evert | Rooftop wrote:
>> 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..
>
> 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
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: delete & unlock on previously locked resources

Julian Reschke
In reply to this post by Joe Orton-2

Joe Orton wrote:
> On Tue, Nov 04, 2008 at 10:10:17PM -0500, Evert | Rooftop wrote:
>> 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..
>
> 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

I see. Yes, that's a bug.

I missed that there was a new release :-)

BR, Julian