#include "protocols/packet.h"
#include "service_inspectors/http_inspect/http_common.h"
#include "service_inspectors/http_inspect/http_field.h"
+#include "service_inspectors/http_inspect/http_inspect.h"
#include "service_inspectors/http_inspect/http_test_manager.h"
#include "stream/stream.h"
return true;
}
-bool Http2Inspect::get_fp_buf(InspectionBuffer::Type /*ibt*/, Packet* /*p*/,
- InspectionBuffer& /*b*/)
+bool Http2Inspect::get_fp_buf(InspectionBuffer::Type ibt, Packet* p, InspectionBuffer& b)
{
- // No fast pattern buffers have been defined for HTTP/2
- return false;
+ // All current HTTP/2 fast pattern buffers are inherited from http_inspect. Just pass the
+ // request on.
+ Http2FlowData* const session_data =
+ (Http2FlowData*)p->flow->get_flow_data(Http2FlowData::inspector_id);
+
+ if ((session_data == nullptr) || (session_data->hi == nullptr))
+ return false;
+
+ return session_data->hi->get_fp_buf(ibt, p, b);
}
void Http2Inspect::eval(Packet* p)
using namespace HttpCommon;
using namespace Http2Enums;
-// Mindless scan() that just flushes whatever it is given
StreamSplitter::Status Http2StreamSplitter::scan(Packet* pkt, const uint8_t* data, uint32_t length,
uint32_t, uint32_t* flush_offset)
{