diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-10-03 18:16:52 +0000 |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-10-03 18:16:52 +0000 |
commit | a9bd0cc67e77d465ae747071377407f00d62f19c (patch) | |
tree | a1a14bedc803b1b128d7868f52f8842003205836 /Lib/test/test_httpservers.py | |
parent | ec2ee17cf8a94f637f195ba8fd32399a27e08c9f (diff) | |
download | cpython-git-a9bd0cc67e77d465ae747071377407f00d62f19c.tar.gz |
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
........
Diffstat (limited to 'Lib/test/test_httpservers.py')
-rw-r--r-- | Lib/test/test_httpservers.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py index e8288227e3..a00c5f2171 100644 --- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -475,6 +475,13 @@ class CGIHTTPServerTestCase(BaseTestCase): 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: |