aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-01-25 07:36:02 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2016-01-25 09:49:24 +0100
commit2f82457bbc4e0aba4be0dc513524b06ba4e800d4 (patch)
tree4b230df42abf811eb474705cc965d549db5f03df /contrib
parent7e7d21722adb1d456b269f387b909e86ff6828e2 (diff)
downloadcalcurse-2f82457bbc4e0aba4be0dc513524b06ba4e800d4.tar.gz
calcurse-2f82457bbc4e0aba4be0dc513524b06ba4e800d4.zip
calcurse-caldav: Fix MIME type in requests
Specify application/xml in the Content-Type of requests except for PUT, where we actually submit calendar data. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/caldav/calcurse-caldav.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py
index ff6bdc1..f7eb306 100755
--- a/contrib/caldav/calcurse-caldav.py
+++ b/contrib/caldav/calcurse-caldav.py
@@ -84,7 +84,10 @@ def get_auth_headers():
def remote_query(cmd, path, additional_headers, body):
headers = get_auth_headers()
- headers['Content-Type'] = 'Content-Type: text/calendar; charset=utf-8'
+ if cmd == 'PUT':
+ headers['Content-Type'] = 'Content-Type: text/calendar; charset=utf-8'
+ else:
+ headers['Content-Type'] = 'Content-Type: application/xml; charset=utf-8'
headers.update(additional_headers)
if debug: