FlorianREGAZ / Python-Tls-Client

Advanced HTTP Library
MIT License
678 stars 135 forks source link

del session.cookies['xxx'] and session.cookies.set('xxx', None) do not work properly #73

Open dljjld opened 1 year ago

dljjld commented 1 year ago

Python 3.7.9 on Windows7 session = tls_client.Session( client_identifier="chrome_109", random_tls_extension_order=True, ) session.get('https://httpbin.org/cookies/set/testcookie/12345') session.get('https://httpbin.org/cookies/set/abc/67890') print(session.cookies.get_dict()) print(session.get('https://httpbin.org/cookies').json()) del session.cookies['testcookie'] print(session.cookies.get_dict()) print(session.get('https://httpbin.org/cookies').json()) session.cookies.set('testcookie', None) print(session.cookies.get_dict()) print(session.get('https://httpbin.org/cookies').json())

The result: {'abc': '67890', 'testcookie': '12345'} {'cookies': {'abc': '67890', 'testcookie': '12345'}} {'abc': '67890'} {'cookies': {'abc': '67890', 'testcookie': '12345'}} {'abc': '67890'} {'cookies': {'abc': '67890', 'testcookie': '12345'}}

Can fix it?