Commit d3a20b67 authored by David Read's avatar David Read
Browse files

[#24] Add option to switch off HTTPS verifying, for if openssl version is too old or something.

parent 5e8d7d8b
......@@ -247,6 +247,7 @@ Config settings
* ``ckanext-archiver.cache_url_root`` = URL where you will be publicly serving the cached files stored locally at ckanext-archiver.archive_dir.
* ``ckanext-archiver.max_content_length`` = the maximum size (in bytes) of files to archive (default ``50000000`` =50MB)
* ``ckanext-archiver.user_agent_string`` = identifies the archiver to servers it archives from
* ``ckanext-archiver.verify_https`` = true/false whether you want to verify https connections and therefore fail if it is specified in the URL but does not verify.
4. Nightly report generation
......@@ -345,7 +345,9 @@ def download(context, resource, url_timeout=30,
# May raise DownloadException
method_func = {'GET': requests.get, 'POST':}[method]
res = requests_wrapper(log, method_func, url, timeout=url_timeout,
stream=True, headers=headers)
stream=True, headers=headers,
url_redirected_to = res.url if url != res.url else None
if context.get('previous') and ('etag' in res.headers):
......@@ -509,6 +511,11 @@ def get_plugins_waiting_on_ipipe():
def verify_https():
from pylons import config
return toolkit.asbool(config.get('ckanext-archiver.verify_https', True))
def _clean_content_type(ct):
# For now we should remove the charset from the content type and
# handle it better, differently, later on.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment