Revert "upgrade gunicorn 19.0 and make upgrade"

This reverts commit f6c215ae5b.
This commit is contained in:
Feanil Patel
2018-10-31 15:01:00 -04:00
parent cab11bde68
commit 4e13a1c2dd
12 changed files with 38 additions and 51 deletions

View File

@@ -96,8 +96,6 @@ def server_track(request, event_type, event, page=None):
except:
username = "anonymous"
host_header = 'HTTP_HOST' if request is not None and 'HTTP_HOST' in request.META else 'SERVER_NAME'
# define output:
event = {
"username": username,
@@ -110,7 +108,7 @@ def server_track(request, event_type, event, page=None):
"agent": _get_request_header(request, 'HTTP_USER_AGENT').decode('latin1'),
"page": page,
"time": datetime.datetime.utcnow().replace(tzinfo=pytz.utc),
"host": _get_request_header(request, host_header),
"host": _get_request_header(request, 'SERVER_NAME'),
"context": eventtracker.get_tracker().resolve_context(),
}