MCPcopy
hub / github.com/urllib3/urllib3 / _proxy_requires_url_absolute_form

Method _proxy_requires_url_absolute_form

src/urllib3/poolmanager.py:410–421  ·  view source on GitHub ↗

Indicates if the proxy requires the complete destination URL in the request. Normally this is only needed when not using an HTTP CONNECT tunnel.

(self, parsed_url: Url)

Source from the content-addressed store, hash-verified

408 return base_pool_kwargs
409
410 def _proxy_requires_url_absolute_form(self, parsed_url: Url) -> bool:
411 """
412 Indicates if the proxy requires the complete destination URL in the
413 request. Normally this is only needed when not using an HTTP CONNECT
414 tunnel.
415 """
416 if self.proxy is None:
417 return False
418
419 return not connection_requires_http_tunnel(
420 self.proxy, self.proxy_config, parsed_url.scheme
421 )
422
423 def urlopen( # type: ignore[override]
424 self, method: str, url: str, redirect: bool = True, **kw: typing.Any

Callers 3

urlopenMethod · 0.95
test_proxy_tunnelMethod · 0.80

Calls 1

Tested by 2

test_proxy_tunnelMethod · 0.64