Mercurial > libervia-web
comparison src/server/server.py @ 950:67a59552f3e3
server (blog): fixed avatars handling, there is now a well-known URL to SERVICE_PROFILE cache
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 03 Jun 2017 22:27:04 +0200 |
parents | 00236973e138 |
children | 4f7cb6335a33 |
comparison
equal
deleted
inserted
replaced
949:36e9747520fd | 950:67a59552f3e3 |
---|---|
2126 | 2126 |
2127 @raise ImportError: OpenSSL is not available | 2127 @raise ImportError: OpenSSL is not available |
2128 @raise IOError: the certificate file doesn't exist | 2128 @raise IOError: the certificate file doesn't exist |
2129 @raise OpenSSL.crypto.Error: the certificate file is invalid | 2129 @raise OpenSSL.crypto.Error: the certificate file is invalid |
2130 """ | 2130 """ |
2131 # now that we have service profile connected, we add resource for its cache | |
2132 service_path = regex.pathEscape(C.SERVICE_PROFILE) | |
2133 cache_dir = os.path.join(self.cache_root_dir, service_path) | |
2134 self.cache_resource.putChild(service_path, ProtectedFile(cache_dir)) | |
2135 self.service_cache_url = os.path.join(C.CACHE_DIR, service_path) | |
2136 | |
2131 if self.options['connection_type'] in ('https', 'both'): | 2137 if self.options['connection_type'] in ('https', 'both'): |
2132 self._TLSOptionsCheck() | 2138 self._TLSOptionsCheck() |
2133 context_factory = self._getTLSContextFactory() | 2139 context_factory = self._getTLSContextFactory() |
2134 reactor.listenSSL(self.options['port_https'], self.site, context_factory) | 2140 reactor.listenSSL(self.options['port_https'], self.site, context_factory) |
2135 if self.options['connection_type'] in ('http', 'both'): | 2141 if self.options['connection_type'] in ('http', 'both'): |