[Moin-user] Changes in request object in 1.9.x
Roger Haase
crosseyedpenguin at yahoo.com
Wed Jan 20 11:37:52 EST 2010
--- On Tue, 1/19/10, Mark Bradford <mark at ucar.edu> wrote:
> From: Mark Bradford <mark at ucar.edu>
> Subject: [Moin-user] Changes in request object in 1.9.x
> To: moin-user at lists.sourceforge.net
> Date: Tuesday, January 19, 2010, 12:37 PM
> In the Changes file for 1.9.0, I
> see:
>
> * HINT: due to big changes in the request processing
> and the request
> object (related to the WSGI refactoring),
> many 3rd party plugins might
> need code updates to work with moin 1.9.
>
> Are these "big changes" documented somewhere? I'm
> trying to udpate to
> 1.9.1, and for a couple of my wikis, there is some custom
> authentication
> code which uses request.getPathinfo and
> request.getScriptname...
>
Take a look at pep 333:
http://www.python.org/dev/peps/pep-0333/#environ-variables
For example, instead of:
if request.http_user_agent == 'CLI/Script':
for Moin 1.9 you must now do:
if request.environ.get('HTTP_USER_AGENT', None) == 'CLI/Script':
Roger Haase
More information about the Moin-user
mailing list