From b91d53dc6f2657ab0c190ccd1606d50df00dff84 Mon Sep 17 00:00:00 2001 From: Astound Date: Mon, 11 Mar 2024 09:47:35 +0800 Subject: Use response.headers instead of response.getheaders() response.getheaders() will be deprecated by urllib3. --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server.py') diff --git a/server.py b/server.py index 66e3f80..2c53d0c 100644 --- a/server.py +++ b/server.py @@ -84,7 +84,7 @@ def proxy_site(env, start_response, video=False): else: response, cleanup_func = util.fetch_url_response(url, send_headers) - response_headers = response.getheaders() + response_headers = response.headers if isinstance(response_headers, urllib3._collections.HTTPHeaderDict): response_headers = response_headers.items() if video: -- cgit v1.2.3