MCPcopy Create free account
hub / github.com/python-websockets/websockets / get_server_name

Method get_server_name

src/websockets/sync/router.py:176–180  ·  view source on GitHub ↗
(self, connection: ServerConnection, request: Request)

Source from the content-addressed store, hash-verified

174 rule.websocket = True
175
176 def get_server_name(self, connection: ServerConnection, request: Request) -> str:
177 if self.server_name is None:
178 return request.headers["Host"]
179 else:
180 return self.server_name
181
182 def redirect(self, connection: ServerConnection, url: str) -> Response:
183 response = connection.respond(http.HTTPStatus.FOUND, f"Found at {url}")

Callers 1

route_requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected