Added support for HEAD requests.