[Web-SIG] Future of WSGI

Tres Seaver tseaver at palladion.com
Wed Nov 25 21:08:40 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Malthe Borch wrote:
> 2009/11/25 Aaron Watters <arw1961 at yahoo.com>:
>>> From: Chris Dent <chris.dent at gmail.com>
>>> I can (barely) relate to some of the complaints that
>>> start_response is a pain in the ass, but environ, to me, is
>>> not broken.
>> I agree.  It maps nicely onto the underlying protocol
>> and WSGI is supposed to be low level right?
> 
> It's not ``environ`` which is broken, it is the "special" entries like
> wsgi.input and wsgi.multithread.

How about 'PATH_INFO', 'SCRIPT_NAME', etc:  none of those are headers.
Please re-read PEP 333[1] for the rationale.

> That's because I equate ``environ`` with the request headers. It may
> be wrong.

You are:  the environ is modeled on the CGI environment, which has lots
more stuff in it than headers.

> But if ``environ`` reflects the entire request and not just
> the headers, why is it then not called ``request``.

Because it is a dictionary like the one passed to CGI applications, ot a
"request object".  The looseness of a dict is part of why WSGI works for
interoperability.


[1] http://www.python.org/dev/peps/pep-0333/#id17


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksNjscACgkQ+gerLs4ltQ5SXQCfQeRgnX6OUL+2d3vU7LQmqRoK
fS0AoK+fPxXi9BYEqQw+UI9y7/OK3trV
=mHsV
-----END PGP SIGNATURE-----



More information about the Web-SIG mailing list