Skip to content

wsgi proxy and 'hop by hop' #133

Description

@faassen

The WSGI proxy implementation passes hop-by-hop related headers (like transfer-encoding, connection, etc) through unchanged. According to PEP 3333 these however do not apply to WSGI:

http://legacy.python.org/dev/peps/pep-3333/

Indeed Waitress gives an exception when you try, and mod_wsgi seems to choke on such requests.

Since the WSGI proxy should be a conformant WSGI implementation, it should remove these hop by hop headers. This won't affect chunking, as if the proxy is proxying a chunked response, WSGI will return the chunks one by one in its iterator result. A WSGI server can then add them back again (I've seen Waitress does).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions