From e766f0b67caa6facf4a9173f1dc3eb931dd16e24 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 17 Dec 2012 03:16:21 -0500 Subject: [PATCH] meh --- requests/adapters.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/requests/adapters.py b/requests/adapters.py index 2f45e2a..10ed251 100644 --- a/requests/adapters.py +++ b/requests/adapters.py @@ -10,7 +10,7 @@ and maintain connections. import os from .models import Response from .packages.urllib3.poolmanager import PoolManager -from .utils import DEFAULT_CA_BUNDLE_PATH +from .utils import DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers import socket from .structures import CaseInsensitiveDict @@ -43,9 +43,7 @@ class BaseAdapter(object): class HTTPAdapter(BaseAdapter): """Built-In HTTP Adapter for Urllib3.""" - def __init__(self, - pool_connections=DEFAULT_POOLSIZE, - pool_maxsize=DEFAULT_POOLSIZE): + def __init__(self, pool_connections=DEFAULT_POOLSIZE, pool_maxsize=DEFAULT_POOLSIZE): self.max_retries = DEFAULT_RETRIES self.config = {} @@ -103,7 +101,7 @@ class HTTPAdapter(BaseAdapter): response.headers = CaseInsensitiveDict(getattr(resp, 'headers', {})) # Set encoding. - # response.encoding = get_encoding_from_headers(response.headers) + response.encoding = get_encoding_from_headers(response.headers) response.raw = resp if isinstance(req.url, bytes): -- 2.7.4