(status, headerlist, exc_info=None)
| 707 | rs = HTTPResponse([]) |
| 708 | |
| 709 | def start_response(status, headerlist, exc_info=None): |
| 710 | if exc_info: |
| 711 | _raise(*exc_info) |
| 712 | if py3k: |
| 713 | # Errors here mean that the mounted WSGI app did not |
| 714 | # follow PEP-3333 (which requires latin1) or used a |
| 715 | # pre-encoding other than utf8 :/ |
| 716 | status = status.encode('latin1').decode('utf8') |
| 717 | headerlist = [(k, v.encode('latin1').decode('utf8')) |
| 718 | for (k, v) in headerlist] |
| 719 | rs.status = status |
| 720 | for name, value in headerlist: |
| 721 | rs.add_header(name, value) |
| 722 | return rs.body.append |
| 723 | |
| 724 | body = app(request.environ, start_response) |
| 725 | rs.body = itertools.chain(rs.body, body) if rs.body else body |
nothing calls this directly
no test coverage detected