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>
This commit is contained in:
Lukas Fleischer 2016-01-25 07:36:02 +01:00
parent 7e7d21722a
commit 2f82457bbc

View File

@ -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: