mirror of
https://github.com/instaloader/instaloader.git
synced 2024-08-17 12:19:38 +02:00
copy_session() now also copies session.headers
Store a shallow copy of the headers rather than just create bindings between the headers of the original and the newly created session object.
This commit is contained in:
parent
99620ec766
commit
3e0b81ad56
@ -103,7 +103,7 @@ def copy_session(session: requests.Session) -> requests.Session:
|
||||
new = requests.Session()
|
||||
new.cookies = \
|
||||
requests.utils.cookiejar_from_dict(requests.utils.dict_from_cookiejar(session.cookies))
|
||||
new.headers = session.headers
|
||||
new.headers = session.headers.copy()
|
||||
return new
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user