(self)
| 107 | return False |
| 108 | |
| 109 | def do_POST(self): |
| 110 | # Ensure that a 'Host' header is contained in the request before responding. |
| 111 | assert "Host" in self.headers |
| 112 | |
| 113 | # Respond with 503. |
| 114 | self.send_response(code=http.client.SERVICE_UNAVAILABLE, |
| 115 | message="Service Unavailable") |
| 116 | # The Python 3 version of SimpleHTTPRequestHandler requires this to be called |
| 117 | # explicitly |
| 118 | self.end_headers() |
| 119 | if self.should_send_body_text(): |
| 120 | # Optionally send body text with 503 message. |
| 121 | self.wfile.write(b"EXTRA") |
| 122 | |
| 123 | |
| 124 | class RequestHandler503Extra(RequestHandler503): |
nothing calls this directly
no test coverage detected