Looking this code I can assume following behavior: When error occurred, Tempesta sends error response, however if at this moment new segment will be received it will be passed to tfw_connection_recv() and again to tfw_http_resp_process() that not expected at this moment. Seems here we should mark connection as Conn_Stop.
Need to develop the new test for this issue. The test:
Send 3 requests from 3 different clients.
Prepare 3 pretty large responses. First one invalid, for instance with invalid header.
Send 1 byte segmented response to Tempesta.
Check the first client received valid response and that connections with another two clients was closed.
Also case T_BLOCKin this place looks strange, because tfw_http_parse_resp() must doesn't return T_BLOCK. Please check it out.
Commit ef121120ad4b0798b74da56fd19f4b21cd09fa81
Looking this code I can assume following behavior: When error occurred, Tempesta sends error response, however if at this moment new segment will be received it will be passed to
tfw_connection_recv()
and again totfw_http_resp_process()
that not expected at this moment. Seems here we should mark connection asConn_Stop
.Need to develop the new test for this issue. The test:
Also
case T_BLOCK
in this place looks strange, becausetfw_http_parse_resp()
must doesn't returnT_BLOCK
. Please check it out.