Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use requests "sessions". #332

Merged
merged 1 commit into from Jun 25, 2016
Merged

Use requests "sessions". #332

merged 1 commit into from Jun 25, 2016

Conversation

ralphbean
Copy link
Sponsor Collaborator

This should make things marginally faster. When not using sessions, we
have to keep initiating new TCP connections over and over again. Wasted
overhead.

This should make things marginally faster.  When not using sessions, we
have to keep initiating new TCP connections over and over again.  Wasted
overhead.
@ralphbean ralphbean merged commit c884262 into develop Jun 25, 2016
@ralphbean ralphbean deleted the feature/http-sessions branch June 25, 2016 23:24
ralphbean added a commit that referenced this pull request Jul 5, 2016
There are some default headers attached to requests sessions:

```python
>>> import requests
>>> s = requests.session()
>>> print(s.headers)
{
    'Connection': 'keep-alive',
    'Accept-Encoding': 'gzip, deflate',
    'Accept': '*/*',
    'User-Agent': 'python-requests/2.10.0',
}
```

In #332 we accidentally started overwriting all of those defaults.
This change brings them back into play and should fix #345.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant