We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 889a564 commit 66b571eCopy full SHA for 66b571e
h11/_headers.py
@@ -1,4 +1,5 @@
1
import re
2
+from collections.abc import Sequence
3
4
from ._abnf import field_name, field_value
5
from ._util import bytesify, LocalProtocolError, validate
@@ -62,7 +63,7 @@
62
63
_field_value_re = re.compile(field_value.encode("ascii"))
64
65
-class Headers:
66
+class Headers(Sequence):
67
"""
68
A list-like interface that allows iterating over headers as byte-pairs
69
of (lowercased-name, value).
newsfragments/112.doc.rst
@@ -0,0 +1,3 @@
+Clarify that the Headers class is a Sequence and inherit from the
+collections Sequence abstract base class to also indicate this (and
+gain the mixin methods). See also #104.
0 commit comments