A WSGI app that just reflects its HTTP environ.
(environ, start_response)
| 88 | """ |
| 89 | |
| 90 | def test_app(environ, start_response): |
| 91 | """A WSGI app that just reflects its HTTP environ.""" |
| 92 | start_response("200 OK", []) |
| 93 | http_environ_items = sorted( |
| 94 | "%s:%s" % (k, v) for k, v in environ.items() if k.startswith("HTTP_") |
| 95 | ) |
| 96 | yield (",".join(http_environ_items)).encode() |
| 97 | |
| 98 | rfile = BytesIO() |
| 99 | rfile.write(b"GET / HTTP/1.0\r\n") |