Skip to content

Commit

Permalink
QPACK: Handle it as an error if we receive an ack for a section for w… (
Browse files Browse the repository at this point in the history
#268)

…hich we have no indices.

Motivation:

We should treat it as an error if we receive an ack for a section for
which we have no indices.

Modifications:

Throw exception if we receive an ack for a section that has no indices

Result:

Correctly handle acks
  • Loading branch information
normanmaurer authored Dec 1, 2023
1 parent 6e69097 commit 69d9196
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,12 @@ void sectionAcknowledgment(long streamId) throws QpackException {
if (tracker.isEmpty()) {
streamSectionTrackers.remove(streamId);
}
if (dynamicTableIndices != null) {
dynamicTableIndices.forEach(dynamicTable::acknowledgeInsertCount);

if (dynamicTableIndices == null) {
throw INVALID_SECTION_ACKNOWLEDGMENT;
}

dynamicTableIndices.forEach(dynamicTable::acknowledgeInsertCount);
}

/**
Expand Down

0 comments on commit 69d9196

Please sign in to comment.