Set content type

main
Bob Mottram 2020-06-19 11:51:13 +01:00
parent c608bd443b
commit c08dd907d2
1 changed files with 2 additions and 0 deletions

View File

@ -531,6 +531,7 @@ class PubServer(BaseHTTPRequestHandler):
redirect) redirect)
if not httpRedirect: if not httpRedirect:
print('Redirect from existing headers: ' + str(self.headers))
self.headers = [] self.headers = []
if cookie: if cookie:
if not cookie.startswith('SET:'): if not cookie.startswith('SET:'):
@ -542,6 +543,7 @@ class PubServer(BaseHTTPRequestHandler):
self.headers['Location'] = redirect self.headers['Location'] = redirect
self.headers['Host'] = callingDomain self.headers['Host'] = callingDomain
self.headers['InstanceID'] = self.server.instanceId self.headers['InstanceID'] = self.server.instanceId
self.headers['Content-type'] = 'text/html; charset=utf-8'
self.headers['Content-Length'] = '0' self.headers['Content-Length'] = '0'
self.headers['X-Robots-Tag'] = 'noindex' self.headers['X-Robots-Tag'] = 'noindex'
self.do_GET() self.do_GET()