Closed as duplicate of#112064
Closed as duplicate of#112064
Description
Bug report
Bug description:
connection = http.client.HTTPSConnection("some_address")
headers = {
"Connection": "close",
}
connection.request("GET", "/some_path", headers=headers)
response = connection.getresponse()
assert response.chunked is True
# data = response.read(None) # get correct answer
data = response.read(-1) # get incorrect answer
Param value amt
can be negative, e.x. -1.
In that case we read all data, with chunk separators, instead of correct reading.
P.S. example of using -1 here:
https://github.com/Textualize/rich/blob/master/rich/progress.py#L247
CPython versions tested on:
3.10, 3.11
Operating systems tested on:
Linux