Fix even more tests!

lol rfc inconsistency
This commit is contained in:
Markus Unterwaditzer 2014-04-14 15:15:25 +02:00
parent 6a9de56df2
commit a2dcec02a0

View file

@ -237,11 +237,25 @@ class DavStorage(Storage):
self._check_response(response)
def _list(self, xml):
headers = self._default_headers()
# CardDAV: The request MUST include a Depth header. The scope of the
# query is determined by the value of the Depth header. For example,
# to query all address object resources in an address book collection,
# the REPORT would use the address book collection as the Request- URI
# and specify a Depth of 1 or infinity.
# http://tools.ietf.org/html/rfc6352#section-8.6
#
# CalDAV:
# The request MAY include a Depth header. If no Depth header is
# included, Depth:0 is assumed.
# http://tools.ietf.org/search/rfc4791#section-7.8
headers['Depth'] = 'infinity'
response = self._request(
'REPORT',
'',
data=xml,
headers=self._default_headers()
headers=headers
)
response.raise_for_status()
root = etree.XML(response.content)