Make http parsing more robust
Fix bug with extracting domain name