Merge pull request #268 from shvar/patch-1

Fix upstream_cert call in case of https2http
This commit is contained in:
Maximilian Hils 2014-04-29 12:49:53 +02:00
commit e15b97372b

View File

@ -226,7 +226,7 @@ class ConnectionHandler:
else:
host = self.server_conn.address.host
sans = []
if not self.config.no_upstream_cert or not self.server_conn.ssl_established:
if not self.config.no_upstream_cert and self.server_conn.ssl_established:
upstream_cert = self.server_conn.cert
if upstream_cert.cn:
host = upstream_cert.cn.decode("utf8").encode("idna")