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

Method send_response_only

Lib/http/server.py:538–550  ·  view source on GitHub ↗

Send the response header only.

(self, code, message=None)

Source from the content-addressed store, hash-verified

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."""
540 if self.request_version != 'HTTP/0.9':
541 if message is None:
542 if code in self.responses:
543 message = self.responses[code][0]
544 else:
545 message = ''
546 if not hasattr(self, '_headers_buffer'):
547 self._headers_buffer = []
548 self._headers_buffer.append(("%s %d %s\r\n" %
549 (self.protocol_version, code, message)).encode(
550 'latin-1', 'strict'))
551
552 def send_header(self, keyword, value):
553 """Send a MIME header to the headers buffer."""

Callers 3

handle_expect_100Method · 0.95
send_responseMethod · 0.95

Calls 2

appendMethod · 0.45
encodeMethod · 0.45