MCPcopy Index your code
hub / github.com/python-websockets/websockets / redirect

Method redirect

tests/asyncio/test_client.py:529–532  ·  view source on GitHub ↗
(connection, request)

Source from the content-addressed store, hash-verified

527 """Client follows redirect to a secure URI on a different origin."""
528
529 def redirect(connection, request):
530 response = connection.respond(http.HTTPStatus.FOUND, "")
531 response.headers["Location"] = get_uri(other_server)
532 return response
533
534 async with serve(*args, ssl=SERVER_CONTEXT, process_request=redirect) as server:
535 async with serve(*args, ssl=SERVER_CONTEXT) as other_server:

Callers

nothing calls this directly

Calls 2

get_uriFunction · 0.70
respondMethod · 0.45

Tested by

no test coverage detected