Use full domain

main2
Bob Mottram 2019-10-11 20:25:36 +01:00
parent 060b63b384
commit 8ea78dda93
2 changed files with 8 additions and 3 deletions

View File

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

View File

@ -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('?'):