shazow/urllib3 — pull request #406 by jschneier (2014-06-04 00:10:43+00:00)
Title: Cleanup duplicated and inconsistent logic

This has been annoying me for a while. There were extra checks for popping off source address, the way we are creating connections is totally inconsistent between ``HTTPConnection`` and ``HTTPSConnection`` even accounting for the fact that we need different logic for tunneling https connections and it's all really confusing. Especially that part where we set ``conn.conn_kw`` in the ``connectionpool`` when we already have a perfectly good way of doing it!

Side note: I don't understand why we have the ``getattr(self, _tunnel_host)`` logic in ``HTTPConnection`` at all. ``_tunnel_host`` is only ever set by ``set_tunnel`` and that logic only exists in ``HTTPSConnectionPool``...I think I am going to remove that too because that block will never get hit.