mirror of
https://github.com/python/cpython.git
synced 2025-09-18 14:40:43 +00:00
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 ........
This commit is contained in:
parent
ec2ee17cf8
commit
a9bd0cc67e
2 changed files with 12 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue