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

def radicale::CalendarHTTPHandler::do_GET (   self )
Manage GET request.

Definition at line 152 of file __init__.py.

                    :
        """Manage GET 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

        answer = answer_text.encode(self._encoding)
        self.send_response(client.OK)
        self.send_header("Content-Length", len(answer))
        self.send_header("Content-Type", "text/calendar")
        self.send_header("ETag", etag)
        self.end_headers()
        self.wfile.write(answer)


Generated by  Doxygen 1.6.0   Back to index