Fix GET requests

This commit is contained in:
Guillaume Ayoub 2012-08-09 16:00:31 +02:00
parent 17857654b0
commit 9f446cb261

View File

@ -356,14 +356,15 @@ class Application(object):
# Get whole collection # Get whole collection
answer_text = collection.text answer_text = collection.text
etag = collection.etag etag = collection.etag
else:
return NOT_ALLOWED
headers = { headers = {
"Content-Type": collection.mimetype, "Content-Type": collection.mimetype,
"Last-Modified": collection.last_modified, "Last-Modified": collection.last_modified,
"ETag": etag} "ETag": etag}
answer = answer_text.encode(self.encoding) answer = answer_text.encode(self.encoding)
return client.OK, headers, answer return client.OK, headers, answer
else:
return NOT_ALLOWED
def head(self, environ, collections, content, user): def head(self, environ, collections, content, user):
"""Manage HEAD request.""" """Manage HEAD request."""