mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Fix GET requests
This commit is contained in:
parent
17857654b0
commit
9f446cb261
1 changed files with 7 additions and 6 deletions
|
@ -356,15 +356,16 @@ class Application(object):
|
||||||
# Get whole collection
|
# Get whole collection
|
||||||
answer_text = collection.text
|
answer_text = collection.text
|
||||||
etag = collection.etag
|
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:
|
else:
|
||||||
return NOT_ALLOWED
|
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):
|
def head(self, environ, collections, content, user):
|
||||||
"""Manage HEAD request."""
|
"""Manage HEAD request."""
|
||||||
status, headers, answer = self.get(environ, collections, content, user)
|
status, headers, answer = self.get(environ, collections, content, user)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue