Merge pull request #2233 from benoitc/remove-version-in-server-header

remove version from the Server header
This commit is contained in:
Benoit Chesneau 2020-01-11 19:17:51 +01:00 committed by GitHub
commit e4e20f273e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -5,4 +5,5 @@
version_info = (20, 0, 4)
__version__ = ".".join([str(v) for v in version_info])
SERVER_SOFTWARE = "gunicorn/%s" % __version__
SERVER = "gunicorn"
SERVER_SOFTWARE = "%s/%s" % (SERVER, __version__)

View File

@ -11,7 +11,7 @@ import sys
from gunicorn.http.message import HEADER_RE
from gunicorn.http.errors import InvalidHeader, InvalidHeaderName
from gunicorn import SERVER_SOFTWARE
from gunicorn import SERVER_SOFTWARE, SERVER
import gunicorn.util as util
# Send files in at most 1GB blocks as some operating systems can have problems
@ -195,7 +195,7 @@ class Response(object):
def __init__(self, req, sock, cfg):
self.req = req
self.sock = sock
self.version = SERVER_SOFTWARE
self.version = SERVER
self.status = None
self.chunked = False
self.must_close = False