small code refactoring
first implementation draft of Apple Autodiscover protocol