From 60228b4bd5591ab68b98c9deb9f98c987d69b486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88ng?= Date: Tue, 30 Jul 2013 15:35:28 +0200 Subject: [PATCH] switching from a GET to a HEAD request for the 404 checker --- ckanext/fso/harvesters/check_for_404s.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ckanext/fso/harvesters/check_for_404s.py b/ckanext/fso/harvesters/check_for_404s.py index 0730ffd..f4e1ced 100644 --- a/ckanext/fso/harvesters/check_for_404s.py +++ b/ckanext/fso/harvesters/check_for_404s.py @@ -16,7 +16,7 @@ resource = dataset.find('resource') url = resource.find('url').text - request = http.request('GET', url) - if request.status != 200: - output_file.write(str(request.status) + ': ' + url + '\n') - print str(request.status) + ': ' + url + status = urllib3.PoolManager().request('HEAD', url).status + if status != 200: + output_file.write(str(status) + ': ' + url + '\n') + print str(status) + ': ' + url