diff options
author | Robert Brewer <fumanchu@aminus.org> | 2008-09-27 22:28:11 +0000 |
---|---|---|
committer | Robert Brewer <fumanchu@aminus.org> | 2008-09-27 22:28:11 +0000 |
commit | f9a89f0a89677d9540e4d7504b70f3342381e915 (patch) | |
tree | 5ae975152f5d4badf411b000a7d252b6ef6f2815 | |
parent | 9a53a8fec7f55513ec478f431cb3df43bf9e513e (diff) | |
download | cherrypy-f9a89f0a89677d9540e4d7504b70f3342381e915.tar.gz |
Allow overriding of SERVER_SOFTWARE (and therefore the 'Server' response header).
-rw-r--r-- | cherrypy/wsgiserver/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cherrypy/wsgiserver/__init__.py b/cherrypy/wsgiserver/__init__.py index 376b0897..b15df884 100644 --- a/cherrypy/wsgiserver/__init__.py +++ b/cherrypy/wsgiserver/__init__.py @@ -1449,7 +1449,8 @@ class CherryPyWSGIServer(object): environ = self.environ.copy() # SERVER_SOFTWARE is common for IIS. It's also helpful for # us to pass a default value for the "Server" response header. - environ["SERVER_SOFTWARE"] = "%s WSGI Server" % self.version + if environ.get("SERVER_SOFTWARE") is None: + environ["SERVER_SOFTWARE"] = "%s WSGI Server" % self.version # set a non-standard environ entry so the WSGI app can know what # the *real* server protocol is (and what features to support). # See http://www.faqs.org/rfcs/rfc2145.html. |