return accelerate_this_packet ? SCAN_NOT_FOUND_ACCELERATE : SCAN_NOT_FOUND;
}
-ScanResult HttpBodyH2Cutter::cut(const uint8_t* /*buffer*/, uint32_t length,
+ScanResult HttpBodyH2Cutter::cut(const uint8_t* buffer, uint32_t length,
HttpInfractions* infractions, HttpEventGen* events, uint32_t flow_target, bool /*stretch*/,
H2BodyState state)
{
// Not enough data yet to create a message section
octets_seen += length;
total_octets_scanned += length;
- return SCAN_NOT_FOUND;
+ return need_accelerated_blocking(buffer, length) ?
+ SCAN_NOT_FOUND_ACCELERATE : SCAN_NOT_FOUND;
}
else
{
num_flush = flow_target - octets_seen;
total_octets_scanned += num_flush;
+ need_accelerated_blocking(buffer, num_flush);
return SCAN_FOUND_PIECE;
}
}
HttpEnums::CompressId compression) :
HttpBodyCutter(accelerated_blocking, compression), expected_body_length(expected_length)
{}
- HttpEnums::ScanResult cut(const uint8_t*, uint32_t, HttpInfractions*, HttpEventGen*,
- uint32_t flow_target, bool stretch, HttpEnums::H2BodyState state) override;
+ HttpEnums::ScanResult cut(const uint8_t* buffer, uint32_t length, HttpInfractions*,
+ HttpEventGen*, uint32_t flow_target, bool stretch, HttpEnums::H2BodyState state) override;
private:
int64_t expected_body_length;
uint32_t total_octets_scanned = 0;
if (source_id == SRC_SERVER)
{
+ // detained inspection not supported for HTTP/2
if (params->script_detection)
session_data->accelerated_blocking[source_id] = AB_INSPECT;
- else if (params->detained_inspection)
+ else if ((params->detained_inspection) && !session_data->for_http2)
session_data->accelerated_blocking[source_id] = AB_DETAIN;
}
case SEC_BODY_H2:
return (HttpCutter*)new HttpBodyH2Cutter(
session_data->data_length[source_id],
- AB_NONE,
+ session_data->accelerated_blocking[source_id],
session_data->compression[source_id]);
default:
assert(false);