1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-06-26 16:45:52 +00:00

Cache item name and component_name

This commit is contained in:
Unrud 2017-08-29 20:08:28 +02:00
parent f37b22b682
commit 642b4236fe
2 changed files with 33 additions and 15 deletions

View file

@ -607,7 +607,7 @@ def get_content_type(item):
"""
mimetype = OBJECT_MIMETYPES[item.name]
encoding = item.collection.configuration.get("encoding", "request")
tag = find_tag(item)
tag = item.component_name
content_type = "%s;charset=%s" % (mimetype, encoding)
if tag:
content_type += ";component=%s" % tag