mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix SERVER_SOFTWARE property
WSGI spec requires the SERVER_SOFTWARE property containing the name and version. This change fix it and separate the version header from SERVER_SOFTWARE property. We expose the SERVER variable so custom installations can change it in one place without looking much when needed.
This commit is contained in:
parent
2f944c9bea
commit
dcfd0f04e8
@ -5,4 +5,6 @@
|
||||
|
||||
version_info = (20, 0, 4)
|
||||
__version__ = ".".join([str(v) for v in version_info])
|
||||
SERVER_SOFTWARE = "gunicorn"
|
||||
SERVER = "gunicorn"
|
||||
SERVER_SOFTWARE = "%s/%s" % (SERVER, __version__)
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user