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

Method send_response_only

Lib/http/server.py:566–578  ·  view source on GitHub ↗

Send the response header only.

(self, code, message=None)

Source from the content-addressed store, hash-verified

564 self.send_header('Date', self.date_time_string())
565
566 def send_response_only(self, code, message=None):
567 """Send the response header only."""
568 if self.request_version != 'HTTP/0.9':
569 if message is None:
570 if code in self.responses:
571 message = self.responses[code][0]
572 else:
573 message = ''
574 if not hasattr(self, '_headers_buffer'):
575 self._headers_buffer = []
576 self._headers_buffer.append(("%s %d %s\r\n" %
577 (self.protocol_version, code, message)).encode(
578 'latin-1', 'strict'))
579
580 def send_header(self, keyword, value):
581 """Send a MIME header to the headers buffer."""

Callers 3

handle_expect_100Method · 0.95
send_responseMethod · 0.95

Calls 3

hasattrFunction · 0.85
appendMethod · 0.45
encodeMethod · 0.45