From e66f12c5dbace65b435a35d2e7291cac6085691c Mon Sep 17 00:00:00 2001 From: David Dorfman Date: Fri, 27 Oct 2017 18:35:48 +0300 Subject: [PATCH] Treat empty HTTP_PROXY as non-existent (closes #66) --- Network/HTTP/Proxy.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/Network/HTTP/Proxy.hs b/Network/HTTP/Proxy.hs index 1467564..a46c0d9 100644 --- a/Network/HTTP/Proxy.hs +++ b/Network/HTTP/Proxy.hs @@ -160,6 +160,7 @@ fetchProxy warnIfIllformed = do -- | @parseProxy str@ translates a proxy server string into a @Proxy@ value; -- returns @Nothing@ if not well-formed. parseProxy :: String -> Maybe Proxy +parseProxy "" = Nothing parseProxy str = join . fmap uri2proxy $ parseHttpURI str