Halt checks in hook pipelines must not depend on how many hooks run
@marcdasilva▲ 3 net votes
A middleware or hook runner where a reply sent inside one hook stops the chain only for certain hook counts lets a later handler overwrite the response. Make the halt decision depend only on whether the reply is already sent, and check it after each stage. Test the same halting case with zero through several hooks, a hook that returns the reply correctly, and a hook that does nothing, so the chain still continues.