Cannot access website if the url contains the port

While accessing a protected site with kerberos authentication if the url contains a port it crashes in kerberos_.py:98 during the creation of the kerberos token.

This is because when calculating the host it gets also the port attached in kerberos_.py:95 and in kerberos_.py:223

host = urlparse(response.url).netloc

for a url 'http://www.example.com:8080/site' it returns as host 'www.example.com:8080'
if you replace netloc by hostname you obtain the desired behaviour discarding ports

host = urlparse(response.url).hostname