a fix for HEAD request.