(self, environ, start_response)
| 822 | """ |
| 823 | |
| 824 | def __call__(self, environ, start_response): |
| 825 | req = Request(environ) |
| 826 | status = b"200 OK" |
| 827 | if req.method == "GET": |
| 828 | body = self.body |
| 829 | else: |
| 830 | body = b""" |
| 831 | <html> |
| 832 | <head><title>display page</title></head> |
| 833 | <body> |
| 834 | """ + self.get_files_page(req) + b""" |
| 835 | </body> |
| 836 | </html> |
| 837 | """ |
| 838 | headers = [ |
| 839 | ('Content-Type', 'text/html; charset=utf-8'), |
| 840 | ('Content-Length', str(len(body)))] |
| 841 | # PEP 3333 requires native strings: |
| 842 | headers = [(str(k), str(v)) for k, v in headers] |
| 843 | start_response(status, headers) |
| 844 | assert(isinstance(body, bytes)) |
| 845 | return [body] |
| 846 | |
| 847 | def get_files_page(self, req): |
| 848 | file_parts = [] |
nothing calls this directly
no test coverage detected