(self, data)
| 535 | self.wfile.write(response) |
| 536 | |
| 537 | def decode_request_content(self, data): |
| 538 | #support gzip encoding of request |
| 539 | encoding = self.headers.get("content-encoding", "identity").lower() |
| 540 | if encoding == "identity": |
| 541 | return data |
| 542 | if encoding == "gzip": |
| 543 | try: |
| 544 | return gzip_decode(data) |
| 545 | except NotImplementedError: |
| 546 | self.send_response(501, "encoding %r not supported" % encoding) |
| 547 | except ValueError: |
| 548 | self.send_response(400, "error decoding gzip content") |
| 549 | else: |
| 550 | self.send_response(501, "encoding %r not supported" % encoding) |
| 551 | self.send_header("Content-length", "0") |
| 552 | self.end_headers() |
| 553 | |
| 554 | def report_404 (self): |
| 555 | # Report a 404 error |
no test coverage detected