Logo Search packages:      
Sourcecode: radicale version File versions  Download package

def radicale::CalendarHTTPHandler::do_DELETE (   self )
Manage DELETE request.

Definition at line 182 of file __init__.py.

                       :
        """Manage DELETE request."""
        item = self._calendar.get_item(xmlutils.name_from_path(self.path))
        if item and self.headers.get("If-Match", item.etag) == item.etag:
            # No ETag precondition or precondition verified, delete item
            self._answer = xmlutils.delete(self.path, self._calendar)

            self.send_response(client.NO_CONTENT)
            self.send_header("Content-Length", len(self._answer))
            self.end_headers()
            self.wfile.write(self._answer)
        else:
            # No item or ETag precondition not verified, do not delete item
            self.send_response(client.PRECONDITION_FAILED)


Generated by  Doxygen 1.6.0   Back to index