1
0
mirror of https://github.com/django/django.git synced 2024-12-30 13:05:45 +00:00
Commit Graph

5 Commits

Author SHA1 Message Date
Kevin Michel
225261b701 Refs #31928 -- Added various middlewares tests for detecting when get_response is coroutine. 2020-08-28 12:33:29 +02:00
Kevin Michel
825ce75fae Fixed #31928 -- Fixed detecting an async get_response in various middlewares.
SecurityMiddleware and the three cache middlewares were not calling
super().__init__() during their initialization or calling the required
MiddlewareMixin._async_check() method.

This made the middlewares not properly present as coroutine and
confused the middleware chain when used in a fully async context.

Thanks Kordian Kowalski for the report.
2020-08-28 12:33:15 +02:00
Kevin Michel
68d7cf4054 Refs #26601 -- Added various middlewares tests for deprecation of passing None as get_response. 2020-08-28 12:33:15 +02:00
Michael Galler
547a07fa7e Fixed #31905 -- Made MiddlewareMixin call process_request()/process_response() with thread sensitive.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2020-08-26 07:13:49 +02:00
Claude Paroz
4d973f5939 Refs #26601 -- Deprecated passing None as get_response arg to middleware classes.
This is the new contract since middleware refactoring in Django 1.10.

Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-02-18 20:03:44 +01:00