parameters: (self, conn)
docstring: Establish tunnel connection early, because otherwise httplib
          would improperly set Host: header to proxy's IP:port.
docstring_summary: Establish tunnel connection early, because otherwise httplib
          would improperly set Host: header to proxy's IP:port.
docstring_tokens: Establish tunnel connection early because otherwise httplib would improperly set Host : header to proxy s IP : port .
function: def _prepare_proxy(self, conn):
          """
          Establish tunnel connection early, because otherwise httplib
          would improperly set Host: header to proxy's IP:port.
          """
          # Python 2.7+
          try:
              set_tunnel = conn.set_tunnel
          except AttributeError:  # Platform-specific: Python 2.6
              set_tunnel = conn._set_tunnel
  
          if sys.version_info <= (2, 6, 4) and not self.proxy_headers:   # Python 2.6.4 and older
              set_tunnel(self.host, self.port)
          else:
              set_tunnel(self.host, self.port, self.proxy_headers)
  
          conn.connect()
function_tokens: def _prepare_proxy ( self , conn ) : # Python 2.7+ try : set_tunnel = conn . set_tunnel except AttributeError : # Platform-specific: Python 2.6 set_tunnel = conn . _set_tunnel if sys . version_info <= ( 2 , 6 , 4 ) and not self . proxy_headers : # Python 2.6.4 and older set_tunnel ( self . host , self . port ) else : set_tunnel ( self . host , self . port , self . proxy_headers ) conn . connect ( )