Back to index

python3.2  3.2.2
Public Member Functions | Static Public Attributes
test.ssl_servers.StatsRequestHandler Class Reference
Collaboration diagram for test.ssl_servers.StatsRequestHandler:
Collaboration graph

List of all members.

Public Member Functions

def do_GET
def do_HEAD
def log_request

Static Public Attributes

string server_version = "StatsHTTPS/1.0"

Detailed Description

Example HTTP request handler which returns SSL statistics on GET

Definition at line 86 of file

Member Function Documentation

def test.ssl_servers.StatsRequestHandler.do_GET (   self,
  send_body = True 
Serve a GET request.

Definition at line 93 of file

00094     def do_GET(self, send_body=True):
00095         """Serve a GET request."""
00096         sock = self.rfile.raw._sock
00097         context = sock.context
00098         body = pprint.pformat(context.session_stats())
00099         body = body.encode('utf-8')
00100         self.send_response(200)
00101         self.send_header("Content-type", "text/plain; charset=utf-8")
00102         self.send_header("Content-Length", str(len(body)))
00103         self.end_headers()
00104         if send_body:
00105             self.wfile.write(body)

Here is the call graph for this function:

Here is the caller graph for this function:

Serve a HEAD request.

Definition at line 106 of file

00107     def do_HEAD(self):
00108         """Serve a HEAD request."""
00109         self.do_GET(send_body=False)

Here is the call graph for this function:

def test.ssl_servers.StatsRequestHandler.log_request (   self,

Definition at line 110 of file

00111     def log_request(self, format, *args):
00112         if support.verbose:
00113             BaseHTTPRequestHandler.log_request(self, format, *args)

Member Data Documentation

Definition at line 91 of file

The documentation for this class was generated from the following file: