diff --git a/stream.py b/stream.py index b892000..5d4f0aa 100755 --- a/stream.py +++ b/stream.py @@ -87,7 +87,10 @@ def get_proxy_url(proxy, current, path): return presp.text def upstream_type(current, proxy): - resp = requests.head(current, proxies=proxy.req) + if proxy is None: + resp = requests.head(current) + else: + resp = requests.head(current, proxies=proxy.req) return resp.headers.get("Content-Type", "binary/octet-stream") def rewrite(current, provider, proxy, ctype):