If we do fallback to WinHTTP, set both proxy and proxyByPass because they are logically a pair
John Rusk
4 years ago
47 | 47 | defer globalFreeWrapper(defaultCfg.lpszProxy) |
48 | 48 | defer globalFreeWrapper(defaultCfg.lpszProxyBypass) |
49 | 49 | |
50 | // Changed, next 2 lines, so if that if we always set both of these (they are a pair, it doesn't make sense to set one here and keep the value of the other from above) | |
51 | newProxy := StringFromUTF16Ptr(defaultCfg.lpszProxy) | |
52 | if proxy == "" { | |
53 | proxy = newProxy | |
54 | } | |
55 | ||
56 | newProxyByPass := StringFromUTF16Ptr(defaultCfg.lpszProxyBypass) | |
57 | if proxyByPass == "" { | |
58 | proxyByPass = newProxyByPass | |
59 | } | |
50 | // Always set both of these (they are a pair, it doesn't make sense to set one here and keep the value of the other from above) | |
51 | proxy = StringFromUTF16Ptr(defaultCfg.lpszProxy) | |
52 | proxyByPass = StringFromUTF16Ptr(defaultCfg.lpszProxyBypass) | |
60 | 53 | } |
61 | 54 | } |
62 | 55 |