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)
| 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.""" |