MCPcopy
hub / github.com/scrapy/scrapy / connectionMade

Method connectionMade

scrapy/core/downloader/handlers/http11.py:658–675  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

656 )
657
658 def connectionMade(self) -> None:
659 assert self.transport
660 if self._certificate is None:
661 with suppress(AttributeError):
662 self._certificate = ssl.Certificate(
663 self.transport._producer.getPeerCertificate()
664 )
665
666 if self._ip_address is None:
667 self._ip_address = ipaddress.ip_address(
668 self.transport._producer.getPeer().host
669 )
670
671 if self._tls_verbose_logging:
672 connection = self.transport._producer.getHandle()
673 hostname = urlparse_cached(self._request).hostname
674 assert hostname is not None
675 _log_ssl_conn_debug_info(hostname, connection)
676
677 def dataReceived(self, data: bytes) -> None:
678 # This maybe called several times after cancel was called with buffered data.

Callers

nothing calls this directly

Calls 2

urlparse_cachedFunction · 0.90
_log_ssl_conn_debug_infoFunction · 0.90

Tested by

no test coverage detected