pistache
pistache copied to clipboard
Broken Async::Promise from Http::ResponseWriter::send()
The promise returned from Http::ResponseWriter::send() doesn't call the success callback.
I've written a unit test and run the git bisect session which resulted in:
6e0710533f5363d658c63047bf976808fe55e2f7 is the first bad commit
commit 6e0710533f5363d658c63047bf976808fe55e2f7
Author: Arthur de Araújo Farias <[email protected]>
Date: Fri Feb 22 01:04:50 2019 +0100
Fixing connection handling problem without modifying request object
Fixes #333
src/common/http.cc | 35 ++++++++++++++++++++++++++++++-----
1 file changed, 30 insertions(+), 5 deletions(-)
My test is very similar to the example appearing in http://pistache.io/guide/#asynchronous-http-programming, but modified slightly in order to be able to check a test assertion.
The test is attached. Feel free to modify it if necessary.