Bug 152457

Summary: CFNet backend proxy detection is not very good
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Minor CC: ap, darin, mcatanzaro
Priority: P2    
Version: Other   
Hardware: PC   
OS: OS X 10.11   
See Also: https://bugs.webkit.org/show_bug.cgi?id=145542

Description Michael Catanzaro 2015-12-18 19:01:46 PST
To determine whether or not to perform DNS prefetch, the CFNet backend checks the system proxy settings once every five seconds to determine whether a proxy would be used to load http://example.com/ or https://example.com/; see platform/network/DNSResolveQueue.cpp and platform/network/cf/DNSCFNet.cpp. This is not ideal, since if a proxy is configured for only a particular domain, then WebKit could perform DNS prefetch for that domain, defeating the (privacy) purpose of having selected the proxy. It would be better if it were possible to ask the system if it's possible that a proxy could be used on *any* site, and if so, disable prefetch globally. (Checking proxy settings for every prefetch is probably undesirable as that could cause a performance regression.)
Comment 1 Michael Catanzaro 2015-12-18 19:15:04 PST
Another comment from Darin (from bug #145542): "This 5-second polling strategy is really strange on iOS and Mac. Surely there are notifications of changes in proxy status that we could take advantage of instead of using polling. Someone should talk to CFNetwork experts about this at some point."