From 8ea78dda931b0f47de32b33995fd879295f7145c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 11 Oct 2019 20:25:36 +0100 Subject: [PATCH] Use full domain --- daemon.py | 2 +- webinterface.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/daemon.py b/daemon.py index 0b05b79a..b39ae7d8 100644 --- a/daemon.py +++ b/daemon.py @@ -1058,7 +1058,7 @@ class PubServer(BaseHTTPRequestHandler): # show the calendar screen msg=htmlCalendar(self.server.translate, \ self.server.baseDir,self.path, \ - self.server.domain).encode() + self.server.domainFull).encode() self._set_headers('text/html',len(msg),cookie) self.wfile.write(msg) self.server.GETbusy=False diff --git a/webinterface.py b/webinterface.py index 5a6f7150..d375464f 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2847,13 +2847,18 @@ def htmlCalendarDay(translate: {}, \ return calendarStr def htmlCalendar(translate: {}, \ - baseDir: str,path: str,domain: str) -> str: + baseDir: str,path: str, \ + httpPrefix: str,domainFull: str) -> str: """Show the calendar for a person """ + domain=domainFull + if ':' in domainFull: + domain=domainFull.split(':')[0] + monthNumber=0 dayNumber=None year=1970 - actor=path.replace('/calendar','') + actor=httpPrefix+'://'+domainFull+path.replace('/calendar','') if '?' in actor: first=True for p in actor.split('?'):