demianbrecht / sanction

A dead simple OAuth2 client implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow for persistent connections

demianbrecht opened this issue · comments

Backwards compatible

Often, there are external calls made to a provider in a single request (i.e. exchange code for access token, followed by a profile request for user data). As urllib2 is being used, Connection: close is injected into these requests, requiring a new connection to be established.

urllib2 should be dumped in favour of http[lib].HTTPConnection objects. Features to account for in this issue:

  • Persistent connections
  • Connection pooling or automatic closing of open connection if host changes in request URIs
  • Proxy tunnelling
  • HTTP and HTTPS connectivity