mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
4b34131bd5
commit
5e8826cd98
2 changed files with 12 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue