Handle a single HTTP GET request. Default implementation indicates an error because XML-RPC uses the POST method.
(self)
| 653 | sys.stdout.buffer.flush() |
| 654 | |
| 655 | def handle_get(self): |
| 656 | """Handle a single HTTP GET request. |
| 657 | |
| 658 | Default implementation indicates an error because |
| 659 | XML-RPC uses the POST method. |
| 660 | """ |
| 661 | |
| 662 | code = 400 |
| 663 | message, explain = BaseHTTPRequestHandler.responses[code] |
| 664 | |
| 665 | response = http.server.DEFAULT_ERROR_MESSAGE % \ |
| 666 | { |
| 667 | 'code' : code, |
| 668 | 'message' : message, |
| 669 | 'explain' : explain |
| 670 | } |
| 671 | response = response.encode('utf-8') |
| 672 | print('Status: %d %s' % (code, message)) |
| 673 | print('Content-Type: %s' % http.server.DEFAULT_ERROR_CONTENT_TYPE) |
| 674 | print('Content-Length: %d' % len(response)) |
| 675 | print() |
| 676 | sys.stdout.flush() |
| 677 | sys.stdout.buffer.write(response) |
| 678 | sys.stdout.buffer.flush() |
| 679 | |
| 680 | def handle_request(self, request_text=None): |
| 681 | """Handle a single XML-RPC request passed through a CGI post method. |
no test coverage detected