Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 1dd2ec57ff4eb4b7fa341db5e9ada54d9c942136 1 parent 49a1ded
@adarsh adarsh authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/helpers/uri_validator.rb
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.