2009/11/24 Henry Precheur <he...@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

_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: 
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com

Reply via email to