Refactory HeadRequestHandler