diff --git a/src/hpack/hpack.py b/src/hpack/hpack.py index 7e33e77..20dce0a 100644 --- a/src/hpack/hpack.py +++ b/src/hpack/hpack.py @@ -313,7 +313,7 @@ def add(self, to_add: tuple[bytes, bytes], sensitive: bool, huffman: bool = Fals # can use the indexed literal. index, name, perfect = match - if perfect: + if perfect is not None: # Indexed representation. encoded = self._encode_indexed(index) else: