http.server.BaseHTTPRequestHandler.rfile

rfile Contains an input stream, positioned at the start of the optional input data.

http.server.BaseHTTPRequestHandler.responses

responses This attribute contains a mapping of error code integers to two-element tuples containing a short and long message. For example, {code: (shortmessage, longmessage)}. The shortmessage is usually used as the message key in an error response, and longmessage as the explain key. It is used by send_response_only() and send_error() methods.

http.server.BaseHTTPRequestHandler.request_version

request_version Contains the version string from the request. For example, 'HTTP/1.0'.

http.server.BaseHTTPRequestHandler.requestline

requestline Contains the string representation of the HTTP request line. The terminating CRLF is stripped. This attribute should be set by handle_one_request(). If no valid request line was processed, it should be set to the empty string.

http.server.BaseHTTPRequestHandler.protocol_version

protocol_version This specifies the HTTP protocol version used in responses. If set to 'HTTP/1.1', the server will permit HTTP persistent connections; however, your server must then include an accurate Content-Length header (using send_header()) in all of its responses to clients. For backwards compatibility, the setting defaults to 'HTTP/1.0'.

http.server.BaseHTTPRequestHandler.path

path Contains the request path.

http.server.BaseHTTPRequestHandler.MessageClass

MessageClass Specifies an email.message.Message-like class to parse HTTP headers. Typically, this is not overridden, and it defaults to http.client.HTTPMessage.

http.server.BaseHTTPRequestHandler.log_request()

log_request(code='-', size='-') Logs an accepted (successful) request. code should specify the numeric HTTP code associated with the response. If a size of the response is available, then it should be passed as the size parameter.

http.server.BaseHTTPRequestHandler.log_message()

log_message(format, ...) Logs an arbitrary message to sys.stderr. This is typically overridden to create custom error logging mechanisms. The format argument is a standard printf-style format string, where the additional arguments to log_message() are applied as inputs to the formatting. The client ip address and current date and time are prefixed to every message logged.

http.server.BaseHTTPRequestHandler.log_error()

log_error(...) Logs an error when a request cannot be fulfilled. By default, it passes the message to log_message(), so it takes the same arguments (format and additional values).