Public Member Functions | |
def | __init__ |
def | BuildResponses |
def | Chunkify |
def | processed_end |
def | QueueRequests |
def | WriteError |
Private Member Functions | |
def | _BuildResponse |
Private Attributes | |
_max_pipeline_depth | |
_processed_end | |
_requested_paths | |
_were_all_requests_http_1_1 |
Builds HTTP responses for a list of accumulated requests.
Definition at line 182 of file http_pipe.py.
def http_pipe.ResponseBuilder.__init__ | ( | self | ) |
Initializer.
Definition at line 185 of file http_pipe.py.
def http_pipe.ResponseBuilder._BuildResponse | ( | self, | |
status, | |||
headers, | |||
body | |||
) | [private] |
Builds an HTTP response. Args: status: (String) Response code and descrtion (e.g. "200 OK") headers: (List of Strings) Headers (e.g. "Connection: close") body: (String) Response body. Returns: (String) Text of HTTP response.
Definition at line 321 of file http_pipe.py.
def http_pipe.ResponseBuilder.BuildResponses | ( | self | ) |
Converts the queue of requests into responses. Returns: (String) Buffer containing all of the responses.
Definition at line 206 of file http_pipe.py.
def http_pipe.ResponseBuilder.Chunkify | ( | self, | |
data, | |||
chunksize | |||
) |
Divides a string into chunks
Definition at line 201 of file http_pipe.py.
def http_pipe.ResponseBuilder.processed_end | ( | self | ) |
Definition at line 318 of file http_pipe.py.
def http_pipe.ResponseBuilder.QueueRequests | ( | self, | |
requested_paths, | |||
were_all_requests_http_1_1 | |||
) |
Adds requests to the queue of requests. Args: requested_paths: (List of Strings) Requested paths.
Definition at line 192 of file http_pipe.py.
def http_pipe.ResponseBuilder.WriteError | ( | self, | |
status, | |||
error | |||
) |
Returns an HTTP response for the specified error. Args: status: (String) Response code and descrtion (e.g. "404 Not Found") Returns: (String) Text of HTTP response.
Definition at line 305 of file http_pipe.py.
Definition at line 185 of file http_pipe.py.
Definition at line 185 of file http_pipe.py.
Definition at line 185 of file http_pipe.py.
Definition at line 185 of file http_pipe.py.