Squashed commit of the following:
commit
20251de1765966cdef9a47dc8ee04787024e0578
Author: Tom Peters <thopeter@cisco.com>
Date: Fri Sep 25 16:07:34 2020 -0400
http2_inspect: free up HI flow data when we are finished with it
INF_HUFFMAN_INCOMPLETE_CODE_PADDING = 9,
INF_MISSING_CONTINUATION = 10,
INF_UNEXPECTED_CONTINUATION = 11,
- INF_LOOKUP_EMPTY_VALUE = 12,
+ INF_UNUSED_1 = 12,
INF_INVALID_PSEUDO_HEADER = 13,
INF_PSEUDO_HEADER_AFTER_REGULAR_HEADER = 14,
INF_PSEUDO_HEADER_URI_FORM_MISMATCH = 15,
{
header.set(header_len, header_buffer, true);
// FIXIT-E want to refactor so that zero-length frames are not a special case
- if (data_len > 0)
+ if (data_buffer != nullptr)
data.set(data_len, data_buffer, true);
}
name.set(entry->name);
value.set(entry->value);
- // FIXIT-E how bad is this?
- if (value.length() <= 0)
- {
- *infractions += INF_LOOKUP_EMPTY_VALUE;
- }
-
if (!write_header_part(name, (const uint8_t*)": ", 2, decoded_header_buffer,
decoded_header_length, partial_bytes_written))
return false;
current_frame->clear();
delete current_frame;
current_frame = nullptr;
+
+ if ((state[SRC_CLIENT] >= STREAM_COMPLETE) && (state[SRC_SERVER] >= STREAM_COMPLETE) &&
+ (hi_flow_data != nullptr))
+ {
+ delete hi_flow_data;
+ hi_flow_data = nullptr;
+ session_data->deallocate_hi_memory();
+ }
}
void Http2Stream::set_state(HttpCommon::SourceId source_id, StreamState new_state)