[Calypso] [PATCH 33/35] Support empty PROP requests.
Guido Günther
agx at sigxcpu.org
Sun Jan 10 09:26:19 PST 2016
Hi Jelmer,
On Sat, Jan 09, 2016 at 07:04:22PM +0000, Jelmer Vernooij wrote:
> From: Jelmer Vernooij <jelmer at samba.org>
>
> ---
> calypso/xmlutils.py | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/calypso/xmlutils.py b/calypso/xmlutils.py
> index 08446da..7d78b68 100644
> --- a/calypso/xmlutils.py
> +++ b/calypso/xmlutils.py
> @@ -84,10 +84,14 @@ def propfind(path, xml_request, collection, resource, depth, context):
>
> item_name = paths.resource_from_path(path)
>
> - # Reading request
> - root = ET.fromstring(xml_request)
> + if xml_request:
> + # Reading request
> + root = ET.fromstring(xml_request)
> +
> + prop_element = root.find(_tag("D", "prop"))
> + else:
> + prop_element = None
>
> - prop_element = root.find(_tag("D", "prop"))
According to
http://www.webdav.org/specs/rfc2518.html#METHOD_PROPFIND
Par 8.1 an empty propfind seems fine. Should we add this to the commit
message?
Otherwise ACK, please apply.
Cheers,
-- Guido
> if prop_element is not None:
> prop_list = prop_element.getchildren()
> props = [prop.tag for prop in prop_list]
> --
> 2.7.0.rc3
>
> _______________________________________________
> Calypso mailing list
> Calypso at keithp.com
> http://keithp.com/mailman/listinfo/calypso
More information about the Calypso
mailing list