[Web-SIG] WSGI 2

Ian Bicking ianb at colorstudy.com
Wed Aug 12 02:18:09 CEST 2009


On Tue, Aug 11, 2009 at 6:25 PM, Graham Dumpleton <
graham.dumpleton at gmail.com> wrote:

> 2009/8/12 Henry Precheur <henry at precheur.org>:
> > Using bytes for all `environ` values is easy to understand on the
> > application side as long as you are aware of the encoding problem. The
> > cost is inconvenience, but that's probably OK. It's also simpler to
> > implement on the gateway/server side.
>
> Use of bytes everywhere can be inconvenient on the gateway/server
> side, at least as far as end result for user.
>
> The specific problem is that WSGI environment is used to hold
> information about the original request, as CGI variables, but also can
> hold user specified custom variables.
>
> In the case of anything hosted via Apache, such as through mod_wsgi,
> mod_fastcgi, mod_fcgid, mod_scgi and mod_cgi(d), users can set such
> custom variables using the SetEnv directive. Thus one might say:
>
>  SetEnv trac.env_path /usr/local/trac/site-1
>

Just to clarify, there specifically is no type restrictions on extension
variables, which is any variable with a "." in it.  The type restrictions
are solely for ALL_CAPS keys.  You can put ints or unicode or whatever in
other variables.  (Probably this doesn't make things any easier for
mod_wsgi, though; at least for this example)

-- 
Ian Bicking  |  http://blog.ianbicking.org  |
http://topplabs.org/civichacker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/web-sig/attachments/20090811/23d8203f/attachment.htm>


More information about the Web-SIG mailing list