Merged revisions 85202 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85202 | senthil.kumaran | 2010-10-03 23:25:45 +0530 (Sun, 03 Oct 2010) | 4 lines
Fix Issue9272 - Change CGIHTTPServer to give the child program a copy of os.environ
........
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index e828822..a00c5f2 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -475,6 +475,13 @@
self.assertEqual(('Hello World\n', 'text/html', 200),
(res.read(), res.getheader('Content-type'), res.status))
+ def test_os_environ_is_not_altered(self):
+ signature = "Test CGI Server"
+ os.environ['SERVER_SOFTWARE'] = signature
+ res = self.request('/cgi-bin/file1.py')
+ self.assertEqual((b'Hello World\n', 'text/html', 200),
+ (res.read(), res.getheader('Content-type'), res.status))
+ self.assertEqual(os.environ['SERVER_SOFTWARE'], signature)
def test_main(verbose=None):
try: