When a user provides headers, these will be added to the session default headers instead of overwriting them:
{'User-Agent': 'python-requests/2.25.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}.
This is because the user agent information may be useful. However, if a user doesn't want to send it they can still easily not by setting conn._session.headers = None.
When a user provides headers, these will be added to the session default headers instead of overwriting them:
{'User-Agent': 'python-requests/2.25.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}
.This is because the user agent information may be useful. However, if a user doesn't want to send it they can still easily not by setting
conn._session.headers = None
.