MCPcopy Index your code
hub / github.com/python/cpython / send_response

Method send_response

Lib/http/server.py:525–536  ·  view source on GitHub ↗

Add the response header to the headers buffer and log the response code. Also send two standard headers with the server software version and the current date.

(self, code, message=None)

Source from the content-addressed store, hash-verified

523 self.wfile.write(body)
524
525 def send_response(self, code, message=None):
526 """Add the response header to the headers buffer and log the
527 response code.
528
529 Also send two standard headers with the server software
530 version and the current date.
531
532 """
533 self.log_request(code)
534 self.send_response_only(code, message)
535 self.send_header('Server', self.version_string())
536 self.send_header('Date', self.date_time_string())
537
538 def send_response_only(self, code, message=None):
539 """Send the response header only."""

Callers 15

send_errorMethod · 0.95
do_GETMethod · 0.80
send_headMethod · 0.80
list_directoryMethod · 0.80
do_POSTMethod · 0.80
do_GETMethod · 0.80
do_TESTMethod · 0.80
do_KEEPMethod · 0.80
do_CUSTOMMethod · 0.80
do_LATINONEHEADERMethod · 0.80
do_GETMethod · 0.80
do_GETMethod · 0.80

Calls 5

log_requestMethod · 0.95
send_response_onlyMethod · 0.95
send_headerMethod · 0.95
version_stringMethod · 0.95
date_time_stringMethod · 0.95

Tested by 15

do_POSTMethod · 0.64
do_GETMethod · 0.64
do_TESTMethod · 0.64
do_KEEPMethod · 0.64
do_CUSTOMMethod · 0.64
do_LATINONEHEADERMethod · 0.64
do_GETMethod · 0.64
do_GETMethod · 0.64
do_HEADMethod · 0.64
do_AUTHHEADMethod · 0.64
do_GETMethod · 0.64