Message5706
See also: https://github.com/grisha/mod_python/issues/13
Also:
http://modpython.org/live/current/doc-html/pythonapi.html
I propose this fix:
# Release 3.4 of mod_python uses add_cgi_vars() and depricates
# add_common_vars. So try to use the add_cgi_vars and if it fails
# with AttributeError because we are running an older mod_apache without
# that function, fallback to add_common_vars.
try:
req.add_cgi_vars()
except AttributeError:
req.add_common_vars()
so we try to call only add_cgi_vars() which is the current preferred
method. If it fails because the function doesn't exist it should
raise and AttributeError at which point we call the older add_common_vars.
Bern, does this look reasonable?
I don't have a suitable apache/mod_python environment to test,
but this sees pretty safe and matches recommendations from mod_python.
-- rouilj |
|
Date |
User |
Action |
Args |
2016-07-02 17:49:25 | rouilj | set | messageid: <1467481765.04.0.790847813218.issue2550821@psf.upfronthosting.co.za> |
2016-07-02 17:49:25 | rouilj | set | recipients:
+ rouilj, ber, jerrykan, grisha |
2016-07-02 17:49:25 | rouilj | link | issue2550821 messages |
2016-07-02 17:49:24 | rouilj | create | |
|