summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJoshua "jag" Ginsberg <jag@flowtheory.net>2013-11-20 20:03:02 -0500
committerTim Graham <timograham@gmail.com>2014-08-29 10:12:03 -0400
commiteb2af16c59c3014541e2ad8ca63e510bc076dd8b (patch)
tree057b38477df5aceef7f0ab3e2b5bd677aa918f17 /django
parent149605dfb4309331d0337af9ac962e67332a45a7 (diff)
Fixed #21483 -- Added WSGI environ to kwargs sent to request_started signal.
Diffstat (limited to 'django')
-rw-r--r--django/core/handlers/wsgi.py2
-rw-r--r--django/core/signals.py2
-rw-r--r--django/test/client.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py
index 88be527d65..5032eed072 100644
--- a/django/core/handlers/wsgi.py
+++ b/django/core/handlers/wsgi.py
@@ -176,7 +176,7 @@ class WSGIHandler(base.BaseHandler):
raise
set_script_prefix(get_script_name(environ))
- signals.request_started.send(sender=self.__class__)
+ signals.request_started.send(sender=self.__class__, environ=environ)
try:
request = self.request_class(environ)
except UnicodeDecodeError:
diff --git a/django/core/signals.py b/django/core/signals.py
index a14af009ed..c530a51f08 100644
--- a/django/core/signals.py
+++ b/django/core/signals.py
@@ -1,5 +1,5 @@
from django.dispatch import Signal
-request_started = Signal()
+request_started = Signal(providing_args=["environ"])
request_finished = Signal()
got_request_exception = Signal(providing_args=["request"])
diff --git a/django/test/client.py b/django/test/client.py
index 1952af27eb..f2bbbfe77d 100644
--- a/django/test/client.py
+++ b/django/test/client.py
@@ -98,7 +98,7 @@ class ClientHandler(BaseHandler):
self.load_middleware()
request_started.disconnect(close_old_connections)
- request_started.send(sender=self.__class__)
+ request_started.send(sender=self.__class__, environ=environ)
request_started.connect(close_old_connections)
request = WSGIRequest(environ)
# sneaky little hack so that we can easily get round