Opened 5 years ago

Last modified 18 months ago

#31949 closed New feature

ASGI - Cache Middleware and some view decorators broken — at Initial Version

Reported by: Michael Galler Owned by: nobody
Component: Core (Other) Version: 3.1
Severity: Normal Keywords: async
Cc: Andrew Godwin, Ben Lomax, Roy Smith, Jon Janzen Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no
Pull Requests:17057 merged, 16999 merged, 17055 merged, 17056 merged, 17059 merged, 16752 merged, 16831 merged, 16874 merged, 16876 unmerged, 16800 merged, 16672 merged, 16436 merged, 16668 merged, 16704 merged, 13483 unmerged

Description

The cache middleware is broken because it inherits from MiddlewareMixin and override the init method.

TypeError: object HttpResponse can't be used in 'await' expression

On both middlewares the self._async_check() is missing in init.

Also the most view decorators are broken on async views, because the dont use async/await.

For example:

cache_control
xframe_options_deny
vary_on_cookie

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top