From beec26ebf842a55ba02a6c6ef210ce67954d12e2 Mon Sep 17 00:00:00 2001 From: designgrill Date: Tue, 13 Jun 2017 00:08:25 +0530 Subject: [PATCH] docs: A middleware is always responsible for calling downstream (#978) Irrespective of whether it is called by an upstream middleware or not. --- docs/guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide.md b/docs/guide.md index de27ade..668d802 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -6,7 +6,7 @@ ## Writing Middleware Koa middleware are simple functions which return a `MiddlewareFunction` with signature (ctx, next). When - the middleware is run by an "upstream" middleware, it must manually invoke `next()` to run the "downstream" middleware. + the middleware is run, it must manually invoke `next()` to run the "downstream" middleware. For example if you wanted to track how long it takes for a request to propagate through Koa by adding an `X-Response-Time` header field the middleware would look like the following: