Respect port number in URLs. Allow setting headers, set User-Agent by default.