Only allow single redirect for now

fix #3931
This commit is contained in:
Ruud
2014-09-23 00:29:48 +02:00
parent d7f43c2cf8
commit 70ca31a265
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -222,7 +222,7 @@ class Plugin(object):
'timeout': timeout,
'files': files,
'verify': False, #verify_ssl, Disable for now as to many wrongly implemented certificates..
'stream': stream
'stream': stream,
}
method = 'post' if len(data) > 0 or files else 'get'
+4 -1
View File
@@ -151,12 +151,15 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En
if not os.path.exists(python_cache):
os.mkdir(python_cache)
session = requests.Session()
session.max_redirects = 1
# Register environment settings
Env.set('app_dir', sp(base_path))
Env.set('data_dir', sp(data_dir))
Env.set('log_path', sp(os.path.join(log_dir, 'CouchPotato.log')))
Env.set('db', db)
Env.set('http_opener', requests.Session())
Env.set('http_opener', session)
Env.set('cache_dir', cache_dir)
Env.set('cache', FileSystemCache(python_cache))
Env.set('console_log', options.console_log)