Skip to content
Snippets Groups Projects
Unverified Commit ef1a85e7 authored by Richard van der Hoff's avatar Richard van der Hoff Committed by GitHub
Browse files

Fix startup error when http proxy is defined. (#6421)

Guess I only tested this on python 2 :/

Fixes #6419.
parent f085894c
No related branches found
No related tags found
No related merge requests found
Fix startup error when http proxy is defined.
...@@ -77,8 +77,8 @@ class PreviewUrlResource(DirectServeResource): ...@@ -77,8 +77,8 @@ class PreviewUrlResource(DirectServeResource):
treq_args={"browser_like_redirects": True}, treq_args={"browser_like_redirects": True},
ip_whitelist=hs.config.url_preview_ip_range_whitelist, ip_whitelist=hs.config.url_preview_ip_range_whitelist,
ip_blacklist=hs.config.url_preview_ip_range_blacklist, ip_blacklist=hs.config.url_preview_ip_range_blacklist,
http_proxy=os.getenv("http_proxy"), http_proxy=os.getenvb(b"http_proxy"),
https_proxy=os.getenv("HTTPS_PROXY"), https_proxy=os.getenvb(b"HTTPS_PROXY"),
) )
self.media_repo = media_repo self.media_repo = media_repo
self.primary_base_path = media_repo.primary_base_path self.primary_base_path = media_repo.primary_base_path
......
...@@ -318,8 +318,8 @@ class HomeServer(object): ...@@ -318,8 +318,8 @@ class HomeServer(object):
def build_proxied_http_client(self): def build_proxied_http_client(self):
return SimpleHttpClient( return SimpleHttpClient(
self, self,
http_proxy=os.getenv("http_proxy"), http_proxy=os.getenvb(b"http_proxy"),
https_proxy=os.getenv("HTTPS_PROXY"), https_proxy=os.getenvb(b"HTTPS_PROXY"),
) )
def build_room_creation_handler(self): def build_room_creation_handler(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment