RPKI Engine
1.0
|
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. |
def rpki::http::http_server::__init__ | ( | self, | |
sock, | |||
handlers | |||
) |
def rpki::http::http_server::find_handler | ( | self, | |
path | |||
) |
Helper method to search self.handlers.
Definition at line 503 of file http.py.
References handlers.
Referenced by handle_message().
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 512 of file http.py.
References expect_close, find_handler(), rpki::http::http_message::headers, rpki::http::http_stream::log, rpki::http::http_listener::log, rpki::http::http_queue::log, irbe_cli::left_right_proto::msg, irbe_cli::publication_proto::msg, rpki::http::http_stream::msg, send_error(), and send_reply().
Referenced by rpki::http::http_stream::chunk_discard_trailer(), rpki::http::http_stream::handle_body(), and handle_no_content_length().
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 495 of file http.py.
References handle_message().
def rpki::http::http_server::send_error | ( | self, | |
code, | |||
reason | |||
) |
Send an error response to this request.
Definition at line 541 of file http.py.
References send_message().
Referenced by handle_message().
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 553 of file http.py.
References expect_close, rpki::http::http_stream::log, rpki::http::http_listener::log, rpki::http::http_queue::log, rpki::http::http_stream::restart(), and rpki::http::http_queue::restart().
Referenced by send_error(), and send_reply().
def rpki::http::http_server::send_reply | ( | self, | |
code, | |||
body = None , |
|||
reason = "OK" |
|||
) |
Send a reply to this request.
Definition at line 547 of file http.py.
References send_message().
Referenced by handle_message().
Definition at line 489 of file http.py.
Referenced by handle_message(), rpki::http::http_client::handle_message(), send_message(), and rpki::http::http_client::send_request().
Definition at line 489 of file http.py.
Referenced by rpki::rpkid::publication_queue::_add(), rpki::rpkid::publication_queue::call_pubd(), find_handler(), and rpki::http::http_listener::handle_accept().
rpki::http::http_server::parse_type = http_request [static] |
Use the default server timeout value set in the module header.
Definition at line 487 of file http.py.
Referenced by rpki::http::http_stream::update_timeout().