MatrixSynapse/tests/http
Tim Leung ddb240293a
Add support for no_proxy and case insensitive env variables (#9372)
### Changes proposed in this PR

- Add support for the `no_proxy` and `NO_PROXY` environment variables
  - Internally rely on urllib's [`proxy_bypass_environment`](bdb941be42/Lib/urllib/request.py (L2519))
- Extract env variables using urllib's `getproxies`/[`getproxies_environment`](bdb941be42/Lib/urllib/request.py (L2488)) which supports lowercase + uppercase, preferring lowercase, except for `HTTP_PROXY` in a CGI environment

This does contain behaviour changes for consumers so making sure these are called out:
- `no_proxy`/`NO_PROXY` is now respected
- lowercase `https_proxy` is now allowed and taken over `HTTPS_PROXY`

Related to #9306 which also uses `ProxyAgent`

Signed-off-by: Timothy Leung tim95@hotmail.co.uk
2021-02-26 17:37:57 +00:00
..
federation Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
__init__.py
ca.crt
ca.key
server.key
test_additional_resource.py Remove spurious "SynapseRequest" result from `make_request" 2020-12-15 22:35:40 +00:00
test_client.py Reduce the memory usage of previewing media files. (#9421) 2021-02-18 09:01:29 -05:00
test_endpoint.py Support icons for Identity Providers (#9154) 2021-01-20 08:15:14 -05:00
test_fedclient.py Handle bad JSON data being returned from the federation API. (#9070) 2021-01-12 11:07:01 -05:00
test_proxyagent.py Add support for no_proxy and case insensitive env variables (#9372) 2021-02-26 17:37:57 +00:00
test_servlet.py
test_simple_client.py