MCPcopy
hub / github.com/encode/uvicorn / _should_upgrade

Method _should_upgrade

uvicorn/protocols/http/httptools_impl.py:165–167  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

163 self.logger.warning(msg)
164
165 def _should_upgrade(self) -> bool:
166 upgrade = self._get_upgrade()
167 return upgrade == b"websocket" and self._should_upgrade_to_ws()
168
169 def data_received(self, data: bytes) -> None:
170 self._unset_keepalive_if_required()

Callers 4

data_receivedMethod · 0.95
on_headers_completeMethod · 0.95
on_bodyMethod · 0.95
on_message_completeMethod · 0.95

Calls 2

_get_upgradeMethod · 0.95
_should_upgrade_to_wsMethod · 0.95

Tested by

no test coverage detected