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)
| 551 | self.wfile.write(body) |
| 552 | |
| 553 | def send_response(self, code, message=None): |
| 554 | """Add the response header to the headers buffer and log the |
| 555 | response code. |
| 556 | |
| 557 | Also send two standard headers with the server software |
| 558 | version and the current date. |
| 559 | |
| 560 | """ |
| 561 | self.log_request(code) |
| 562 | self.send_response_only(code, message) |
| 563 | self.send_header('Server', self.version_string()) |
| 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.""" |