MCPcopy
hub / github.com/scrapy/scrapy / InvalidHostname

Class InvalidHostname

scrapy/core/http2/stream.py:46–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45
46class InvalidHostname(H2Error):
47 def __init__(
48 self, request: Request, expected_hostname: str, expected_netloc: str
49 ) -> None:
50 self.request = request
51 self.expected_hostname = expected_hostname
52 self.expected_netloc = expected_netloc
53
54 def __str__(self) -> str:
55 return f"InvalidHostname: Expected {self.expected_hostname} or {self.expected_netloc} in {self.request}"
56
57
58class StreamCloseReason(Enum):

Callers 1

closeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected