Did not notice this with my previous work, but seems like use/koa handler was not using the correct parsed body (it was using the ctx.body alias, which is for the response, not the request) and thus got hung up on waiting for data on the request while some body parser middleware had already consumed it.
Also updated the test to cover it, although not sure whether that aligns with how the test is structured (I can add a dedicated test case if that seems more appropriate). Without the code changes in this PR, the new test would just hang and timeout at 5s.
Did not notice this with my previous work, but seems like use/koa handler was not using the correct parsed body (it was using the
ctx.body
alias, which is for the response, not the request) and thus got hung up on waiting for data on the request while some body parser middleware had already consumed it.Also updated the test to cover it, although not sure whether that aligns with how the test is structured (I can add a dedicated test case if that seems more appropriate). Without the code changes in this PR, the new test would just hang and timeout at 5s.