comparison src/server/server.py @ 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 4b69f69c6ffd
comparison
equal deleted inserted replaced
1054:f2170536ba23 1055:c2037b44f84e
2024 """ 2024 """
2025 # now that we have service profile connected, we add resource for its cache 2025 # now that we have service profile connected, we add resource for its cache
2026 service_path = regex.pathEscape(C.SERVICE_PROFILE) 2026 service_path = regex.pathEscape(C.SERVICE_PROFILE)
2027 cache_dir = os.path.join(self.cache_root_dir, service_path) 2027 cache_dir = os.path.join(self.cache_root_dir, service_path)
2028 self.cache_resource.putChild(service_path, ProtectedFile(cache_dir)) 2028 self.cache_resource.putChild(service_path, ProtectedFile(cache_dir))
2029 self.service_cache_url = os.path.join(C.CACHE_DIR, service_path) 2029 self.service_cache_url = u'/' + os.path.join(C.CACHE_DIR, service_path)
2030 session_iface.SATSession.service_cache_url = self.service_cache_url
2030 2031
2031 if self.options['connection_type'] in ('https', 'both'): 2032 if self.options['connection_type'] in ('https', 'both'):
2032 self._TLSOptionsCheck() 2033 self._TLSOptionsCheck()
2033 context_factory = self._getTLSContextFactory() 2034 context_factory = self._getTLSContextFactory()
2034 reactor.listenSSL(self.options['port_https'], self.site, context_factory) 2035 reactor.listenSSL(self.options['port_https'], self.site, context_factory)