From 9f446cb261f3ddfaf030dfc5c5c662dfd3f66145 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Thu, 9 Aug 2012 16:00:31 +0200 Subject: [PATCH] Fix GET requests --- radicale/__init__.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index 5bac534..cb8ba83 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -356,15 +356,16 @@ class Application(object): # Get whole collection answer_text = collection.text etag = collection.etag - headers = { - "Content-Type": collection.mimetype, - "Last-Modified": collection.last_modified, - "ETag": etag} - answer = answer_text.encode(self.encoding) - return client.OK, headers, answer else: return NOT_ALLOWED + headers = { + "Content-Type": collection.mimetype, + "Last-Modified": collection.last_modified, + "ETag": etag} + answer = answer_text.encode(self.encoding) + return client.OK, headers, answer + def head(self, environ, collections, content, user): """Manage HEAD request.""" status, headers, answer = self.get(environ, collections, content, user)