synapse-product/synapse/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 SSO: redirect to public URL before setting cookies (#9436) 2021-02-26 14:02:06 +00:00
additional_resource.py Merge different Resource implementation classes (#7732) 2020-07-03 19:02:19 +01:00
client.py Add support for no_proxy and case insensitive env variables (#9372) 2021-02-26 17:37:57 +00:00
connectproxyclient.py Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
matrixfederationclient.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
proxyagent.py Add support for no_proxy and case insensitive env variables (#9372) 2021-02-26 17:37:57 +00:00
request_metrics.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
server.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
servlet.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
site.py Add support for X-Forwarded-Proto (#9472) 2021-02-24 18:11:33 +00:00