[1.6.x] Fixed typo in middleware docs.

Function definition should have an ending colon.

Backport of 48241ec from master