- if (bytes_before_suitable_starting_point > 0) {
- // There's really no usable data here (except for ?backlog=1 users),
- // but we need to get the accounting right anyway.
- DataElement data_element;
- data_element.data.iov_base = const_cast<char *>(existing_data.data());
- data_element.data.iov_len = bytes_before_suitable_starting_point;
- data_element.suitable_for_stream_start = NOT_SUITABLE_FOR_STREAM_START;
- data_elements.push_back(data_element);
- }
- if (bytes_before_suitable_starting_point < existing_data.size()) {
- DataElement data_element;
- data_element.data.iov_base = const_cast<char *>(existing_data.data() + bytes_before_suitable_starting_point);
- data_element.data.iov_len = existing_data.size() - bytes_before_suitable_starting_point;
- data_element.suitable_for_stream_start = SUITABLE_FOR_STREAM_START;
- data_elements.push_back(data_element);
- }
-
- last_suitable_starting_point = -1;