[Web-SIG] Future of WSGI
Malthe Borch
mborch at gmail.com
Tue Nov 24 23:37:13 CET 2009
2009/11/24 Henry Precheur <henry at precheur.org>:
> (See http://tools.ietf.org/html/rfc2616#section-5)
>
> The request body, the request method (GET, POST, ...), the request URL,
> the HTTP version are all in `environ`.
That reference does not mention the environment. It's not an official term.
> If you really want to separate the headers from the rest you would put
> another dictionary containing the headers inside `environ`. Instead WSGI
> puts the headers prefixed with HTTP_ in `environ`, because that's what
> CGI is doing. It might not be 100% clean, or logic, but it's SIMPLER,
> there's no need to deal with nested dictionaries or other more complex
> structure, and it's extensible.
I don't mind those. CGI does it too, like you say.
> namedtuple is Python 2.6+: WSGI can't use it. WSGI must work w/ older
> versions of Python.
It was meant as illustration, but sure.
\malthe
More information about the Web-SIG
mailing list