Skip to content

Commit

Permalink
Remove TODO about informational responses (#3319)
Browse files Browse the repository at this point in the history
Today it's not possible with HTTP/1.1 (see psf/requests#713) and even
python-hyper does not handle this case. This will be handled in
#3336.
  • Loading branch information
pquentin committed Feb 1, 2024
1 parent c42b4ba commit 23f2287
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/urllib3/http2.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,7 @@ def getresponse( # type: ignore[override]
if received_data := self.sock.recv(65535):
events = h2_conn.receive_data(received_data)
for event in events:
if isinstance(
event, h2.events.InformationalResponseReceived
): # Defensive:
continue # TODO: Does the stdlib do anything with these responses?

elif isinstance(event, h2.events.ResponseReceived):
if isinstance(event, h2.events.ResponseReceived):
headers = HTTPHeaderDict()
for header, value in event.headers:
if header == b":status":
Expand Down

0 comments on commit 23f2287

Please sign in to comment.