Public Member Functions | Public Attributes | Static Public Attributes

rpki.http.http_server Class Reference

Inherits rpki::http::http_stream.

Collaboration diagram for rpki.http.http_server:
Collaboration graph

List of all members.

Public Member Functions

def __init__
def find_handler
def handle_message
def handle_no_content_length
def send_error
def send_message
def send_reply

Public Attributes

 expect_close
 handlers

Static Public Attributes

 parse_type = http_request
 Stream parser should look for incoming HTTP request messages.
 timeout = default_server_timeout
 Use the default server timeout value set in the module header.

Detailed Description

HTTP(S) server stream.

Definition at line 448 of file http.py.


Member Function Documentation

def rpki.http.http_server.__init__ (   self,
  sock,
  handlers 
)

Definition at line 461 of file http.py.

def rpki.http.http_server.find_handler (   self,
  path 
)
Helper method to search self.handlers.

Definition at line 475 of file http.py.

def rpki.http.http_server.handle_message (   self  ) 
HTTP layer managed to deliver a complete HTTP request to
us, figure out what to do with it.  Check the command and
Content-Type, look for a handler, and if everything looks right,
pass the message body, path, and a reply callback to the handler.

Definition at line 484 of file http.py.

def rpki.http.http_server.handle_no_content_length (   self  ) 
Handle an incoming message that used neither chunking nor a
Content-Length header (that is: this message will be the last one
in this server stream).  No special action required.

Definition at line 467 of file http.py.

def rpki.http.http_server.send_error (   self,
  code,
  reason 
)
Send an error response to this request.

Definition at line 513 of file http.py.

def rpki.http.http_server.send_message (   self,
  code,
  reason = "OK",
  body = None 
)
Queue up reply message.  If both parties agree that connection is
persistant, and if no error occurred, restart this stream to
listen for next message; otherwise, queue up a close event for
this stream so it will shut down once the reply has been sent.

Definition at line 525 of file http.py.

def rpki.http.http_server.send_reply (   self,
  code,
  body 
)
Send a reply to this request.

Definition at line 519 of file http.py.


Member Data Documentation

Definition at line 465 of file http.py.

Definition at line 463 of file http.py.

Stream parser should look for incoming HTTP request messages.

Definition at line 455 of file http.py.

Use the default server timeout value set in the module header.

Definition at line 459 of file http.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables