Skipped empty proppatch request notifications
This commit is contained in:
@@ -113,17 +113,18 @@ class ApplicationProppatchMixin:
|
|||||||
headers = {"DAV": httputils.DAV_HEADERS,
|
headers = {"DAV": httputils.DAV_HEADERS,
|
||||||
"Content-Type": "text/xml; charset=%s" % self._encoding}
|
"Content-Type": "text/xml; charset=%s" % self._encoding}
|
||||||
try:
|
try:
|
||||||
hook_notification_item = HookNotificationItem(
|
|
||||||
HookNotificationItemTypes.CPATCH,
|
|
||||||
access.path,
|
|
||||||
DefusedET.tostring(
|
|
||||||
xml_content,
|
|
||||||
encoding=self._encoding
|
|
||||||
).decode(encoding=self._encoding)
|
|
||||||
)
|
|
||||||
xml_answer = xml_proppatch(base_prefix, path, xml_content,
|
xml_answer = xml_proppatch(base_prefix, path, xml_content,
|
||||||
item)
|
item)
|
||||||
self._hook.notify(hook_notification_item)
|
if xml_content is not None:
|
||||||
|
hook_notification_item = HookNotificationItem(
|
||||||
|
HookNotificationItemTypes.CPATCH,
|
||||||
|
access.path,
|
||||||
|
DefusedET.tostring(
|
||||||
|
xml_content,
|
||||||
|
encoding=self._encoding
|
||||||
|
).decode(encoding=self._encoding)
|
||||||
|
)
|
||||||
|
self._hook.notify(hook_notification_item)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Bad PROPPATCH request on %r: %s", path, e, exc_info=True)
|
"Bad PROPPATCH request on %r: %s", path, e, exc_info=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user