Mercurial > libervia-web
changeset 1055:c2037b44f84e
server: fixed cache_dir for service profile in session interface
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 30 Jan 2018 08:01:21 +0100 |
parents | f2170536ba23 |
children | 47c354ca66a3 |
files | src/server/server.py src/server/session_iface.py |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/server/server.py Fri Jan 26 11:15:26 2018 +0100 +++ b/src/server/server.py Tue Jan 30 08:01:21 2018 +0100 @@ -2026,7 +2026,8 @@ service_path = regex.pathEscape(C.SERVICE_PROFILE) cache_dir = os.path.join(self.cache_root_dir, service_path) self.cache_resource.putChild(service_path, ProtectedFile(cache_dir)) - self.service_cache_url = os.path.join(C.CACHE_DIR, service_path) + self.service_cache_url = u'/' + os.path.join(C.CACHE_DIR, service_path) + session_iface.SATSession.service_cache_url = self.service_cache_url if self.options['connection_type'] in ('https', 'both'): self._TLSOptionsCheck()
--- a/src/server/session_iface.py Fri Jan 26 11:15:26 2018 +0100 +++ b/src/server/session_iface.py Tue Jan 30 08:01:21 2018 +0100 @@ -44,6 +44,8 @@ @property def cache_dir(self): + if self.profile is None: + return self.service_cache_url + u'/' return os.path.join(u'/', C.CACHE_DIR, self.uuid) + u'/' def getPageData(self, page, key):