-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document that middleware factories are run for every request. #2230
Conversation
Wait a sec, I should have based that on the released tag... Gotta change the branch. |
Codecov Report
@@ Coverage Diff @@
## 2.2 #2230 +/- ##
=======================================
Coverage 97.06% 97.06%
=======================================
Files 38 38
Lines 7691 7691
Branches 1341 1341
=======================================
Hits 7465 7465
Misses 102 102
Partials 124 124 Continue to review full report at Codecov.
|
docs/web.rst
Outdated
@@ -904,6 +904,10 @@ the **next** *middleware factory*. The last *middleware factory* always receives | |||
the :ref:`request handler <aiohttp-web-handler>` selected by the router itself | |||
(by :meth:`UrlDispatcher.resolve`). | |||
|
|||
.. note:: | |||
|
|||
The chain of factories is run for every handled request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think someone could still read this and think it's just reiterating that each middleware is called for all views.
Perhaps we could be more explicit, something like
"Both the outer middleware_factory
coroutine and the inner middleware_handler
coroutine are called for every request handled."
@samuelcolvin Good idea, changed according to your suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@samuelcolvin please merge it
I've merged 2.2 into master. |
@samuelcolvin in aiohttp we do merging release branches like |
humm, I'm not seeing this commit or the change on master? |
Missed to make |
I guess the title says it all. Related to #2225