Use HTTP head instead of GET by default #11

merged 1 commit into from Nov 5, 2011


None yet
2 participants

bkutil commented Nov 4, 2011

Second try :)

Balazs Kutil Use HTTP head instead of GET by default
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 <>

@djberg96 djberg96 added a commit that referenced this pull request Nov 5, 2011

@djberg96 djberg96 Merge pull request #11 from bkutil/http_head
Use HTTP head instead of GET by default

@djberg96 djberg96 merged commit 1c8b682 into djberg96:master Nov 5, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment