[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests

Phillip J. Eby report at bugs.python.org
Wed Nov 4 17:43:39 CET 2009


Phillip J. Eby <pje at telecommunity.com> added the comment:

I've forwarded the suggested fix to the GAE team; it is to add this line:

    os_environ = {}     # Handle GAE and other multi-run CGI use cases

to the class body of CGIHandler.  This should also be done in the Python
stdlib.

Btw, this fix can also be applied as a monkeypatch, by simply doing
'CGIHandler.os_environ = {}' before using CGIHandler.

----------
keywords: +26backport, easy, patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7250>
_______________________________________


More information about the Python-bugs-list mailing list