@@ -252,8 +252,9 @@ def _info_url(info: _Info) -> httpx.URL:
252252
253253
254254def _probe (info : _Info , timeout : float ) -> _Probe :
255+ # The service is local: ignore proxy variables, as Node's fetch in the TypeScript client does.
255256 try :
256- with httpx .Client (timeout = timeout ) as http :
257+ with httpx .Client (timeout = timeout , trust_env = False ) as http :
257258 response = http .get (_info_url (info ), headers = headers (_endpoint (info )))
258259 body : object = None if response .status_code == 404 else response .json ()
259260 except httpx .TimeoutException :
@@ -265,7 +266,7 @@ def _probe(info: _Info, timeout: float) -> _Probe:
265266
266267async def _async_probe (info : _Info , timeout : float ) -> _Probe :
267268 try :
268- async with httpx .AsyncClient (timeout = timeout ) as http :
269+ async with httpx .AsyncClient (timeout = timeout , trust_env = False ) as http :
269270 response = await http .get (_info_url (info ), headers = headers (_endpoint (info )))
270271 body : object = None if response .status_code == 404 else response .json ()
271272 except httpx .TimeoutException :
@@ -469,7 +470,7 @@ def _pty_prepare(file: Path, info: _Info, timeout: float) -> None:
469470 # Publish the ticket before stopping its owner so every replacement contender can adopt it.
470471 if _fresh_for (_read_sidecar (file ), info ):
471472 return
472- with httpx .Client (timeout = timeout , headers = _pty_headers (info )) as http :
473+ with httpx .Client (timeout = timeout , trust_env = False , headers = _pty_headers (info )) as http :
473474 try :
474475 response = http .post (_pty_url (info , "handoff" ))
475476 response .raise_for_status ()
@@ -486,7 +487,7 @@ def _pty_prepare(file: Path, info: _Info, timeout: float) -> None:
486487async def _async_pty_prepare (file : Path , info : _Info , timeout : float ) -> None :
487488 if _fresh_for (_read_sidecar (file ), info ):
488489 return
489- async with httpx .AsyncClient (timeout = timeout , headers = _pty_headers (info )) as http :
490+ async with httpx .AsyncClient (timeout = timeout , trust_env = False , headers = _pty_headers (info )) as http :
490491 try :
491492 response = await http .post (_pty_url (info , "handoff" ))
492493 response .raise_for_status ()
0 commit comments