You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2010/09/17 19:43:33 UTC

[jira] Resolved: (JCR-2731) LockMethod.getResponseAsLockDiscovery() fails when status==201

     [ https://issues.apache.org/jira/browse/JCR-2731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting resolved JCR-2731.
--------------------------------

         Assignee: Jukka Zitting
    Fix Version/s: 2.2.0
       Resolution: Fixed

Fixed as suggested in revision 998219.

> LockMethod.getResponseAsLockDiscovery() fails when status==201 
> ---------------------------------------------------------------
>
>                 Key: JCR-2731
>                 URL: https://issues.apache.org/jira/browse/JCR-2731
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.2.0
>            Reporter: Javier Godoy
>            Assignee: Jukka Zitting
>             Fix For: 2.2.0
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> RFC 4918 Section 9.10.6 specifies that 201 is a valid response code for LOCK: "201 (Created) - The LOCK request was to an unmapped URL, the request succeeded and resulted in the creation of a new resource, and the value of the DAV:lockdiscovery property is included in the response body."
> However, LockMethod.getResponseAsLockDiscovery() would fail in that scenario. 
>     org.apache.jackrabbit.webdav.DavException: Created
> 	 at org.apache.jackrabbit.webdav.client.methods.DavMethodBase.getResponseException(DavMethodBase.java:164)
> 	 at org.apache.jackrabbit.webdav.client.methods.LockMethod.getResponseAsLockDiscovery(LockMethod.java:119)
> The reason is in LockMethod:175 
>       return statusCode == DavServletResponse.SC_OK;
> Should be: 
>       return statusCode == DavServletResponse.SC_OK
>              || statusCode ==DavServletResponse.SC_CREATED;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.