Permalink
Browse files

Rescue all head errors

* Some errors while checking a uri's head were failing due to malformed html
* Rescuing all errors returns false for any reason, so as long as the `get` works, the uri will pass
  • Loading branch information...
1 parent 49a1ded commit 1dd2ec57ff4eb4b7fa341db5e9ada54d9c942136 Adarsh Pandit committed Mar 3, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/helpers/uri_validator.rb
@@ -28,7 +28,7 @@ def valid_uri?(uri)
def head_request_ok?(uri)
response = HTTParty.head(uri)
return response.ok?
- rescue SocketError
+ rescue
return false
end

0 comments on commit 1dd2ec5

Please sign in to comment.