mitmproxy/netlib — pull request #37 by pritambaral (2014-05-28 00:24:12+00:00)
Title: More accurate host, port parsing

When url has username:password segments, netloc has them too.

````python
>>> scheme, netloc = urlparse.urlparse('http://username:password@server:port/path')
>>> netloc
'username:password@server'
````

Fortunately, urlparse in Python 2.6+ parses and returns `hostname` and `port`(if present).