stream->set_hi_flow_data(flow);
}
-HttpMsgSection* Http2FlowData::get_hi_msg_section() const
-{
- Http2Stream* stream = get_hi_stream();
- if (stream == nullptr)
- return nullptr;
- return stream->get_hi_msg_section();
-}
-
-void Http2FlowData::set_hi_msg_section(HttpMsgSection* section)
-{
- assert(stream_in_hi != Http2Enums::NO_STREAM_ID);
- Http2Stream* stream = get_hi_stream();
- stream->set_hi_msg_section(section);
-}
-
class Http2Stream* Http2FlowData::find_stream(uint32_t key) const
{
for (const StreamInfo& stream_info : streams)
// Used by http_inspect to store its stuff
HttpFlowData* get_hi_flow_data() const;
void set_hi_flow_data(HttpFlowData* flow);
- HttpMsgSection* get_hi_msg_section() const;
- void set_hi_msg_section(HttpMsgSection* section);
+ HttpMsgSection* get_hi_msg_section() const { return hi_msg_section; }
+ void set_hi_msg_section(HttpMsgSection* section)
+ { assert((hi_msg_section == nullptr) || (section == nullptr)); hi_msg_section = section; }
friend class Http2Frame;
friend class Http2DataFrame;
// At any given time there may be different streams going in each direction. But only one of
// them is the stream that http_inspect is actually processing at the moment.
uint32_t stream_in_hi = Http2Enums::NO_STREAM_ID;
+ HttpMsgSection* hi_msg_section = nullptr;
// Reassemble() data to eval()
uint8_t lead_frame_header[2][Http2Enums::FRAME_HEADER_LENGTH];
// If this is a truncated headers frame, call http_inspect finish()
if (session_data->is_processing_partial_header())
- session_data->hi_ss[hi_source_id]->finish(session_data->flow);
+ {
+ const bool need_reassemble = session_data->hi_ss[hi_source_id]->finish(session_data->flow);
+ assert(need_reassemble);
+ UNUSED(need_reassemble);
+ }
// http_inspect reassemble() of headers
{
const Field& get_buf(unsigned id);
HttpFlowData* get_hi_flow_data() const { return hi_flow_data; }
void set_hi_flow_data(HttpFlowData* flow_data);
- HttpMsgSection* get_hi_msg_section() const { return hi_msg_section; }
- void set_hi_msg_section(HttpMsgSection* section) { hi_msg_section = section; }
uint32_t get_xtradata_mask() { return (current_frame != nullptr) ?
current_frame->get_xtradata_mask() : 0; }
Http2Frame *get_current_frame() { return current_frame; }
Http2FlowData* const session_data;
Http2Frame* current_frame = nullptr;
HttpFlowData* hi_flow_data = nullptr;
- HttpMsgSection* hi_msg_section = nullptr;
bool end_stream_on_data_flush[2] = { false, false };
Http2Enums::StreamState state[2] =
{ Http2Enums::STREAM_EXPECT_HEADERS, Http2Enums::STREAM_EXPECT_HEADERS };
if (h2i_flow_data != nullptr)
{
current_section = h2i_flow_data->get_hi_msg_section();
+ // assert(current_section != nullptr); // FIXIT-E fix H2I so that this is correct
h2i_flow_data->set_hi_msg_section(nullptr);
}
else