basehttprequesthandler protocol_version http protocol version used in responses the default is 'http/ basehttprequesthandler responses mapping of integer http error codes to two-element tuples (messageexplainthat describe the problem for examplethe integer code is mapped to ("not found""nothing matches the given uri"the integer code and strings in this mapping are use when creating error messages as defined in the error_message_format attribute shown previously when created to handle connectionan instancebof basehttprequesthandler has the following attributesattribute description client_address command path request_version headers client address as tuple (hostportrequest typesuch as 'get''post''head'and so on the request path such as '/index htmlhttp version string from the requestsuch as 'http/ http headers stored in mapping object to test for or extract the contents of headeruse dictionary operations such as headername in headers or headerval headers[headernameinput stream for reading optional input data this is used when client is uploading data (for exampleduring post requestoutput stream for writing response back to the client rfile wfile the following methods are commonly used or redefined in subclassesb send_error(code [message]sends response for an unsuccessful request code is the numeric http response code message is an optional error message log_error(is called to record the error this method creates complete error response using the error_message_format class variablesends it to the clientand closes the connection no further operations should be performed after calling this send_response(code [message]sends response for successful request the http response line is sentfollowed by server and date headers code is an http response codeand message is an optional message log_request(is called to record the request send_header(keywordvaluewrites mime header entry to the output stream keyword is the header keywordand value is its value this should only be called after send_response( end_headers(sends blank line to signal the end of the mime headers lib fl ff