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

def radicale::CalendarHTTPHandler::do_HEAD (   self )
Manage HEAD request.

Definition at line 157 of file __init__.py.

                     :
        """Manage HEAD request."""
        item_name = xmlutils.name_from_path(self.path)
        if item_name:
            # Get calendar item
            items = self._calendar.timezones
            item = self._calendar.get_item(item_name)
            items.append(item)
            answer_text = ical.serialize(
                headers=self._calendar.headers, items=items)
            etag = item.etag
        else:
            # Get whole calendar
            answer_text = self._calendar.text
            etag = self._calendar.etag

        self._answer = answer_text.encode(self._encoding)
        self.send_response(client.OK)
        self.send_header("Content-Length", len(self._answer))
        self.send_header("Content-Type", "text/calendar")
        self.send_header("Last-Modified", self._calendar.last_modified)
        self.send_header("ETag", etag)
        self.end_headers()


Generated by  Doxygen 1.6.0   Back to index