In the test SSL server, also output the cipher name

This commit is contained in:
Antoine Pitrou 2011-12-18 19:00:02 +01:00
parent 6099a03202
commit fb0901c968

View file

@ -94,7 +94,11 @@ class StatsRequestHandler(BaseHTTPRequestHandler):
"""Serve a GET request."""
sock = self.rfile.raw._sock
context = sock.context
body = pprint.pformat(context.session_stats())
stats = {
'session_cache': context.session_stats(),
'cipher': sock.cipher(),
}
body = pprint.pformat(stats)
body = body.encode('utf-8')
self.send_response(200)
self.send_header("Content-type", "text/plain; charset=utf-8")