Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
switching from a GET to a HEAD request for the 404 checker
Browse files Browse the repository at this point in the history
  • Loading branch information
philippkueng committed Jul 30, 2013
1 parent 30f46ef commit 60228b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckanext/fso/harvesters/check_for_404s.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 60228b4

Please # to comment.