xref: /unit/test/python/close/wsgi.py (revision 603)
1*603Szelenkov@nginx.comclass application:
2*603Szelenkov@nginx.com    def __init__(self, environ, start_response):
3*603Szelenkov@nginx.com        self.environ = environ
4*603Szelenkov@nginx.com        self.start = start_response
5*603Szelenkov@nginx.com
6*603Szelenkov@nginx.com    def __iter__(self):
7*603Szelenkov@nginx.com        self.start('200', [(('Content-Length', '0'))])
8*603Szelenkov@nginx.com
9*603Szelenkov@nginx.com    def close(self):
10*603Szelenkov@nginx.com        self.environ['wsgi.errors'].write('Close called.')
11