An ETag should refer to the requested uri, so a Location header will
render it invalid anyway. Gnome's evolution has an if-else block that
first checks ETag and then Location.
bzr revid: p_christ@hol.gr-
20100812111025-xoilqlb956moovgv
# note that we have allowed for > 2 elems
if location:
headers['Location'] = location
-
- try:
- if not etag:
- etag = dc.get_prop(location or uri, "DAV:", "getetag")
- if etag:
- headers['ETag'] = str(etag)
- except Exception:
- pass
+ else:
+ try:
+ if not etag:
+ etag = dc.get_prop(location or uri, "DAV:", "getetag")
+ if etag:
+ headers['ETag'] = str(etag)
+ except Exception:
+ pass
self.send_body(None, '201', 'Created', '', headers=headers)