added support for HEAD requests and If-Modified-Since header