Fix regression breaking websocket message sending.

In fe1ba6f3eb, we change our auth
decorators etc. to use request.POST/request.GET rather than the (now
removed request.REQUEST).  This broke sending messages via our
websockets codepath, because we failed to update the artificial
requests we generate to use request._post as well.
This commit is contained in:
Tim Abbott 2016-11-05 11:30:59 -07:00
parent 75dd822d8e
commit be3e9e3a05
1 changed files with 2 additions and 1 deletions

View File

@ -340,7 +340,8 @@ class MessageSenderWorker(QueueProcessingWorker):
# We're mostly using a WSGIRequest for convenience
environ.update(server_meta['request_environ'])
request = WSGIRequest(environ)
request._request = event['request']
# Note: If we ever support non-POST methods, we'll need to change this.
request._post = event['request']
request.csrf_processing_done = True
user_profile = get_user_profile_by_id(server_meta['user_id'])