Skip to content

Fix wrong XML format for supportedlock prop#12

Merged
messense merged 1 commit into
messense:mainfrom
Vigilans:vigilans/fix-supportedlock
Oct 23, 2022
Merged

Fix wrong XML format for supportedlock prop#12
messense merged 1 commit into
messense:mainfrom
Vigilans:vigilans/fix-supportedlock

Conversation

@Vigilans

Copy link
Copy Markdown
Contributor

As per specification from http://www.webdav.org/specs/rfc4918.html#PROPERTY_supportedlock :

PROPERTY_supportedlock should have following format:

<D:supportedlock> 
  <D:lockentry> 
    <D:lockscope><D:exclusive/></D:lockscope> 
    <D:locktype><D:write/></D:locktype> 
  </D:lockentry> 
  <D:lockentry> 
    <D:lockscope><D:shared/></D:lockscope> 
    <D:locktype><D:write/></D:locktype> 
  </D:lockentry> 
</D:supportedlock> 

While that returned by webdav-handler-rs is:

<D:supportedlock> 
  <D:lockentry> 
    <D:lockscope><D:exclusive/><D:write/></D:lockscope> 
  </D:lockentry> 
  <D:lockentry> 
    <D:lockscope><D:shared/><D:write/></D:lockscope> 
  </D:lockentry> 
</D:supportedlock> 

This made webdav libraries like https://github.com/lookfirst/sardine and https://github.com/thegrizzlylabs/sardine-android report error on parsing XML returned by webdav-handler-rs (thus android apps using this library will fail to use webdav server of webdav-handler-rs). This PR fixes the format by specfication.

This PR is also opened in miquels/webdav-handler-rs#24. I also opened several other PR there (miquels/webdav-handler-rs#11 and miquels/webdav-handler-rs#25), but are related to filesystem quota feature that is mainly relevant with webdav-server-rs binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants