elrodo1 / pywebdav

Automatically exported from code.google.com/p/pywebdav
0 stars 0 forks source link

no support for properties that are not plain XML-safe character strings (binary data, XML nodes) #71

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Forwarded from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=710697

Dear Maintainer,

there's currently no way to return property values from
dav_interface.get_prop() that are anything else than plain characters
strings with no XML-unsafe characters. While
PROPFIND.mk_prop_response() would accept a xml.dom.minidom.Element or
even a list list of those, the Element can only be created from inside
mk_prop_response(): the xml.dom.minidom implementation requires the
Document object for instantiating Nodes, but
PROPFIND.mk_prop_response() and PROPFIND.get_propvalues() do not pass
the Document object down to dav_interface.get_prop().

I'm not sure what the best way to add support for non-string property
values would be. Passing the Document as another parameter to
get_prop() would break existing code using pywebdav. Maybe introducing
a new method get_prop2() and falling back to the one? If the check is
done outside the loop, it may be reasonably efficient.

Original issue reported on code.google.com by mathi...@m9s.biz on 1 Jun 2013 at 5:25