fix handling of multiple Content-type headers
This can happen if an error happens while sending
application/mercurial-0.1 content. The error page will
be sent resulting (for at least lighttpd) in the following
headers:
Content-type: application/mercurial-0.1
Content-type: text/html
which result in req.proto = 'application/mercurial-0.1, text/html'
fix
issue344
inst.reason isn't alway in the form (errno, strerror)
urllib2.urlopen("foobar://foo") is an example
where inst.reason is a string
fix
issue383