Add response content type
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.

This commit is contained in:
Peter Šurda 2024-04-15 17:17:31 +08:00
parent e9d22e69c9
commit 01736ba0fa
Signed by: PeterSurda
GPG Key ID: 3E47497CF67ABB95

View File

@ -60,6 +60,8 @@ class Root:
def todo(self): def todo(self):
cherrypy.response.headers['WWW-Authenticate'] = \ cherrypy.response.headers['WWW-Authenticate'] = \
'Basic realm="ICS access"' 'Basic realm="ICS access"'
cherrypy.response.headers['Content-Type'] = \
'text/calendar'
authorization = cherrypy.request.headers.get('Authorization', ':') authorization = cherrypy.request.headers.get('Authorization', ':')
if not authorization: if not authorization:
raise cherrypy.HTTPError(401, 'Unauthorized') raise cherrypy.HTTPError(401, 'Unauthorized')