File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 1010# This module operates with only one tracker
1111# and must be placed in the tracker directory.
1212#
13+ # mod_python is deplricated and not well tested with release 2.0 of
14+ # roundup. mod_wsgi is the preferred interface. It amy not work
15+ # with python3.
16+
17+ # The patch from https://issues.roundup-tracker.org/issue2550821
18+ # is included. Look for this url below. It is not tested, but
19+ # we assume it's safe and syntax it seems ok.
1320
1421import cgi
1522import os
@@ -119,7 +126,17 @@ def handler(req):
119126 __tracker_cache_lock .release ()
120127 # create environment
121128 # Note: cookies are read from HTTP variables, so we need all HTTP vars
122- req .add_common_vars ()
129+
130+ # https://issues.roundup-tracker.org/issue2550821
131+ # Release 3.4 of mod_python uses add_cgi_vars() and depricates
132+ # add_common_vars. So try to use the add_cgi_vars and if it fails
133+ # with AttributeError because we are running an older mod_apache without
134+ # that function, fallback to add_common_vars.
135+ try :
136+ req .add_cgi_vars ()
137+ except AttributeError :
138+ req .add_common_vars ()
139+
123140 _env = dict (req .subprocess_env )
124141 # XXX classname must be the first item in PATH_INFO. roundup.cgi does:
125142 # path = os.environ.get('PATH_INFO', '/').split('/')
You can’t perform that action at this time.
0 commit comments