This patch replaces the http GET request with HEAD. HEAD requests should
be handled identically, but the response does not contain message
body. GET will still be used when @get_request option is set to true.
Replacing the get_response (which calls GET internally) with a new
http HEAD request would mean code duplication. Thus, the part that does
the actual ping is refactored to a separate private method.
This also means that new requests resulting from redirections are
now subject to timeout limit and they'll correctly use https.
Signed-off-by: Balazs Kutil <email@example.com>