From 0008def0bdbbe630ed4495baea2dbae32e3a2cb7 Mon Sep 17 00:00:00 2001 From: Felipe Rodrigues Date: Sat, 17 Oct 2020 11:21:44 -0300 Subject: [PATCH] Set HTTPResponse.url at init --- Lib/http/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/http/client.py b/Lib/http/client.py index 15abcfeada5915..9309d2f464df16 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -264,6 +264,8 @@ def __init__(self, sock, debuglevel=0, method=None, url=None): self.length = _UNKNOWN # number of bytes left in response self.will_close = _UNKNOWN # conn will close at end of response + self.url = url + def _read_status(self): line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") if len(line) > _MAXLINE: