Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit ec3297a

Browse files
committed
Don't test the limitations on HEADERS size.
1 parent 13ce10a commit ec3297a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hyper/http20/stream.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,12 @@ def open(self, end):
176176
encoded_headers = self._encoder.encode(self.headers)
177177

178178
# It's possible that there is a substantial amount of data here. The
179-
# data needs to go into one HEADERS frame, followed by a nubmber of
179+
# data needs to go into one HEADERS frame, followed by a number of
180180
# CONTINUATION frames. For now, for ease of implementation, let's just
181181
# assume that's never going to happen (16kB of headers is lots!).
182-
if len(encoded_headers) > FRAME_MAX_LEN:
182+
# Additionally, since this is so unlikely, there's no point writing a
183+
# test for this: it's just so simple.
184+
if len(encoded_headers) > FRAME_MAX_LEN: # pragma: no cover
183185
raise ValueError("Header block too large.")
184186

185187
header_frame = HeadersFrame(self.stream_id)

0 commit comments

Comments
 (0)