fix potential segfaults in request/response tracking
do not send responses before the end of the request