Andrei Kulakov <[email protected]> added the comment:
I'm not sure about the hang in 3.7 and CVE, but as far as `get_all()` error is
concerned, it's due to passing the wrong kind of argument as `headers`.
For this (undocumented) method, `headers` should be a Message object created in
this way, e.g.:
headers = email.message_from_string(
'Content-type: %s\nContent-length: %d\nLast-modified: %s\n' %
(mtype or 'text/plain', size, modified))
(see
https://github.com/python/cpython/blob/024209401ebc8a011f242af00efdd8ecece6953d/Lib/urllib/request.py#L1509)
Header obj created in this way does have the `get_all()` method, and I tested
that the method runs without further errors.
----------
nosy: +andrei.avk, kj
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45572>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com