From b2e026dde22b3026fb01873c818b295b669025e3 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Fri, 10 Apr 2015 01:10:49 +0200 Subject: [PATCH] [mod] remove image proxy requests from the connection pool --- searx/webapp.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index 5530becc1..42d004e86 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -26,6 +26,7 @@ import json import cStringIO import os import hashlib +import requests from searx import logger logger = logger.getChild('webapp') @@ -48,7 +49,6 @@ from flask import ( ) from flask.ext.babel import Babel, gettext, format_date from searx import settings, searx_dir -from searx.poolrequests import get as http_get from searx.engines import ( categories, engines, get_engines_stats, engine_shortcuts ) @@ -632,10 +632,10 @@ def image_proxy(): headers = dict_subset(request.headers, {'If-Modified-Since', 'If-None-Match'}) headers['User-Agent'] = gen_useragent() - resp = http_get(url, - stream=True, - timeout=settings['server'].get('request_timeout', 2), - headers=headers) + resp = requests.get(url, + stream=True, + timeout=settings['server'].get('request_timeout', 2), + headers=headers) if resp.status_code == 304: return '', resp.status_code