MCPcopy
hub / github.com/encode/httpx / test_not_same_origin

Function test_not_same_origin

tests/client/test_headers.py:250–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

248
249
250def test_not_same_origin():
251 origin = httpx.URL("https://example.com")
252 request = httpx.Request("GET", "HTTP://EXAMPLE.COM:80")
253
254 client = httpx.Client()
255 headers = client._redirect_headers(request, origin, "GET")
256
257 assert headers["Host"] == origin.netloc.decode("ascii")
258
259
260def test_is_https_redirect():

Callers

nothing calls this directly

Calls 2

_redirect_headersMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected