Commit 39d09053 authored by Denis Bilenko's avatar Denis Bilenko

pywsgi: don't depend on socket having 'is_secure' attribute

parent a3abb910
......@@ -394,7 +394,7 @@ def server(sock, site, log=None, environ=None, max_size=None, max_http_version=D
try:
host, port = sock.getsockname()
port = ':%s' % (port, )
if sock.is_secure:
if hasattr(sock, 'do_handshake'):
scheme = 'https'
if port == ':443':
port = ''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment