This is a simple command line program to get the headers of any webpage by sending an HTTP HEAD request. To use this, download the binary, and give the URL as a parameter. This will give you the HTTP response code, and ignore all redirects, so this is useful to investigate how URL redirection is working (for services like tinyurl and bit.ly). For example, executing
httphead http://www.google.com produces the following output:
HTTP/1.1 200 OK
Date: Fri, 25 Nov 2011 23:41:12 GMT
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
X-XSS-Protection: 1; mode=block
Since I could not find an option to make wget send a HEAD request, I wrote this. This uses win32 library functions in wininet and the C runtime library, so it is likely that you will need to install the msvcrt corresponding to Visual studio 2010 from here.
This program and its source code is licensed under the BSD 2-Clause license.
Last updated Nov 25, 2011 17:07 MST (UTC -0700)