Skip to content

Commit 96c0a33

Browse files
committed
Expand the allowed status codes to 999
The standard is often interpreted as allowing any three digit status code and hence h11 not supporting larger codes results in incompatibities.
1 parent 8195361 commit 96c0a33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

h11/_events.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class Response(_ResponseBase):
224224
225225
The status code of this response, as an integer. For an
226226
:class:`Response`, this is always in the range [200,
227-
600).
227+
1000).
228228
229229
.. attribute:: headers
230230
@@ -245,9 +245,9 @@ class Response(_ResponseBase):
245245
"""
246246

247247
def __post_init__(self) -> None:
248-
if not (200 <= self.status_code < 600):
248+
if not (200 <= self.status_code < 1000):
249249
raise LocalProtocolError(
250-
"Response status_code should be in range [200, 600), not {}".format(
250+
"Response status_code should be in range [200, 1000), not {}".format(
251251
self.status_code
252252
)
253253
)

0 commit comments

Comments
 (0)