comparison roundup/cgi/apache.py @ 5433:86b6cea7a975

Python 3 preparation: avoid string.split().
author Joseph Myers <jsm@polyomino.org.uk>
date Wed, 25 Jul 2018 10:42:42 +0000
parents 302bc481ceb1
children 1ab2c81a64df
comparison
equal deleted inserted replaced
5432:fec18298ae02 5433:86b6cea7a975
120 # create environment 120 # create environment
121 # Note: cookies are read from HTTP variables, so we need all HTTP vars 121 # Note: cookies are read from HTTP variables, so we need all HTTP vars
122 req.add_common_vars() 122 req.add_common_vars()
123 _env = dict(req.subprocess_env) 123 _env = dict(req.subprocess_env)
124 # XXX classname must be the first item in PATH_INFO. roundup.cgi does: 124 # XXX classname must be the first item in PATH_INFO. roundup.cgi does:
125 # path = string.split(os.environ.get('PATH_INFO', '/'), '/') 125 # path = os.environ.get('PATH_INFO', '/').split('/')
126 # os.environ['PATH_INFO'] = string.join(path[2:], '/') 126 # os.environ['PATH_INFO'] = string.join(path[2:], '/')
127 # we just remove the first character ('/') 127 # we just remove the first character ('/')
128 _env["PATH_INFO"] = req.path_info[1:] 128 _env["PATH_INFO"] = req.path_info[1:]
129 if _timing: 129 if _timing:
130 _env["CGI_SHOW_TIMING"] = _timing 130 _env["CGI_SHOW_TIMING"] = _timing

Roundup Issue Tracker: http://roundup-tracker.org/