Преглед на файлове

Fix crash if Content-Type is not given in request.

Guillaume Ayoub преди 16 години
родител
ревизия
f075224d3d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      radicale/__init__.py

+ 1 - 1
radicale/__init__.py

@@ -120,7 +120,7 @@ class CalendarHTTPHandler(server.BaseHTTPRequestHandler):
         charsets = []
 
         # 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:
             charsets.append(content_type.split("charset=")[1].strip())
         # Then append default Radicale charset