mkcalendar/mkcol: return CONFLICT in case of file name collision
This commit is contained in:
@@ -90,6 +90,8 @@ class ApplicationPartMkcalendar(ApplicationBase):
|
|||||||
return httputils.FORBIDDEN
|
return httputils.FORBIDDEN
|
||||||
else:
|
else:
|
||||||
return httputils.INTERNAL_SERVER_ERROR
|
return httputils.INTERNAL_SERVER_ERROR
|
||||||
|
elif type(e) is pathutils.CollidingPathError:
|
||||||
|
return httputils.CONFLICT
|
||||||
else:
|
else:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Bad MKCALENDAR request on %r: %s", path, e, exc_info=True)
|
"Bad MKCALENDAR request on %r: %s", path, e, exc_info=True)
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ class ApplicationPartMkcol(ApplicationBase):
|
|||||||
return httputils.FORBIDDEN
|
return httputils.FORBIDDEN
|
||||||
else:
|
else:
|
||||||
return httputils.INTERNAL_SERVER_ERROR
|
return httputils.INTERNAL_SERVER_ERROR
|
||||||
|
elif type(e) is pathutils.CollidingPathError:
|
||||||
|
return httputils.CONFLICT
|
||||||
else:
|
else:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Bad MKCOL request on %r (type:%s): %s", path, collection_type, e, exc_info=True)
|
"Bad MKCOL request on %r (type:%s): %s", path, collection_type, e, exc_info=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user