libhtp
libhtp copied to clipboard
response: fix connect tunneling bug - v3
The response was emitting partial body data depending on how you fed the parser with inbound and outbound data chunks. It seems the intended behavior is to not emit body data if HTP_STREAM_TUNNEL
will eventually be entered (please correct if mistaken).
The fix was to allow htp_connp_REQ_CONNECT_WAIT_RESPONSE
to resume in order to enter the HTP_STREAM_TUNNEL or complete the request.
The tunneling transaction was also incomplete because the request side wasn't being finalized after entering HTP_STREAM_TUNNEL
.
See test case for example.