mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Fix crash if Content-Type is not given in request.
This commit is contained in:
parent
efed0b415d
commit
f075224d3d
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ class CalendarHTTPHandler(server.BaseHTTPRequestHandler):
|
||||||
charsets = []
|
charsets = []
|
||||||
|
|
||||||
# First append content charset given in the request
|
# First append content charset given in the request
|
||||||
content_type = self.headers["Content-Type"]
|
content_type = self.headers.get("Content-Type", None)
|
||||||
if content_type and "charset=" in content_type:
|
if content_type and "charset=" in content_type:
|
||||||
charsets.append(content_type.split("charset=")[1].strip())
|
charsets.append(content_type.split("charset=")[1].strip())
|
||||||
# Then append default Radicale charset
|
# Then append default Radicale charset
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue