summaryrefslogtreecommitdiff
path: root/Lib/test/test_httpservers.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-10-03 18:04:52 +0000
committerSenthil Kumaran <orsenthil@gmail.com>2010-10-03 18:04:52 +0000
commit5e8826cd981b7bfba8f5f28cddc602bb211fb2f8 (patch)
tree59a31ea8ec1727e393b8c10f4e33502ea4e260db /Lib/test/test_httpservers.py
parent4b34131bd5b2aa6a7b2413ccafc4505bd742f48b (diff)
downloadcpython-git-5e8826cd981b7bfba8f5f28cddc602bb211fb2f8.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.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index 2bd1d71e31..cd6f1cfcfa 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -470,6 +470,13 @@ class CGIHTTPServerTestCase(BaseTestCase):
self.assertEquals((b'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: