Commit 7e4fdca9 authored by iv's avatar iv

Add PROPFIND support.

parent 5ef4c869
...@@ -21,8 +21,11 @@ The HMAC key is reset each time you restart the server. ...@@ -21,8 +21,11 @@ The HMAC key is reset each time you restart the server.
flaskdav is under the GPL2 license. flaskdav is under the GPL2 license.
utils.py is a modified version of PyWebDAV's server/fshandler.py under GPL2 License utils.py is a modified version of PyWebDAV's files that are under GPL2 License
original file: https://code.google.com/p/pywebdav/source/browse/pywebdav/server/fshandler.py original files:
* https://code.google.com/p/pywebdav/source/browse/pywebdav/server/fshandler.py
* https://code.google.com/p/pywebdav/source/browse/pywebdav/lib/propfind.py
* https://code.google.com/p/pywebdav/source/browse/pywebdav/lib/utils.py
## TODO ## TODO
- LOCK/UNLOCK support - LOCK/UNLOCK support
......
...@@ -195,11 +195,23 @@ class WebDAV(MethodView): ...@@ -195,11 +195,23 @@ class WebDAV(MethodView):
return response return response
def propfind(self, pathname): def propfind(self, pathname):
"""
PROPFIND:
return informations about the properties of a resource/collection
into a XML body response
"""
response = g.response response = g.response
# currently unsupported pf = utils.PropfindProcessor(
response.status = '501' request.path,
app.fs_handler,
request.headers.get('Depth', 'infinity'),
self.get_body())
try:
response.data = pf.create_response() + '\n'
except IOError:
response.status = '404'
return response return response
def proppatch(self, pathname): def proppatch(self, pathname):
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment