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.
flaskdav is under the GPL2 license.
utils.py is a modified version of PyWebDAV's server/fshandler.py under GPL2 License
original file: https://code.google.com/p/pywebdav/source/browse/pywebdav/server/fshandler.py
utils.py is a modified version of PyWebDAV's files that are under GPL2 License
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
- LOCK/UNLOCK support
......
......@@ -195,11 +195,23 @@ class WebDAV(MethodView):
return response
def propfind(self, pathname):
"""
PROPFIND:
return informations about the properties of a resource/collection
into a XML body response
"""
response = g.response
# currently unsupported
response.status = '501'
pf = utils.PropfindProcessor(
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
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