MCPcopy Index your code
hub / github.com/RustPython/RustPython / send_header

Method send_header

Lib/http/server.py:580–592  ·  view source on GitHub ↗

Send a MIME header to the headers buffer.

(self, keyword, value)

Source from the content-addressed store, hash-verified

578 'latin-1', 'strict'))
579
580 def send_header(self, keyword, value):
581 """Send a MIME header to the headers buffer."""
582 if self.request_version != 'HTTP/0.9':
583 if not hasattr(self, '_headers_buffer'):
584 self._headers_buffer = []
585 self._headers_buffer.append(
586 ("%s: %s\r\n" % (keyword, value)).encode('latin-1', 'strict'))
587
588 if keyword.lower() == 'connection':
589 if value.lower() == 'close':
590 self.close_connection = True
591 elif value.lower() == 'keep-alive':
592 self.close_connection = False
593
594 def end_headers(self):
595 """Send the blank line ending the MIME headers."""

Callers 15

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

Calls 4

hasattrFunction · 0.85
appendMethod · 0.45
encodeMethod · 0.45
lowerMethod · 0.45

Tested by 12

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