upgrade gunicorn 19.0 and make upgrade

This commit is contained in:
nadeemshahzad
2018-10-30 10:42:58 +00:00
parent e876a35c9e
commit f6c215ae5b
12 changed files with 56 additions and 43 deletions

View File

@@ -135,11 +135,13 @@ def _get_xmodule_instance_args(request, task_id):
permit old-style xqueue callbacks directly to the appropriate module in the LMS.
The `task_id` is also passed to the tracking log function.
"""
host_header = 'HTTP_HOST' if request is not None and 'HTTP_HOST' in request.META else 'SERVER_NAME'
request_info = {'username': request.user.username,
'user_id': request.user.id,
'ip': request.META['REMOTE_ADDR'],
'agent': request.META.get('HTTP_USER_AGENT', '').decode('latin1'),
'host': request.META['SERVER_NAME'],
'host': request.META[host_header],
}
xmodule_instance_args = {'xqueue_callback_url_prefix': get_xqueue_callback_url_prefix(request),