improve checking of sent and received http messages