Bug 69611

Summary: [Qt] WebProcess using proxy settings for localhost as well
Product: WebKit Reporter: Laszlo Gombos <laszlo.gombos>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: gopal.1.raghavan, kenneth, kling, laszlo.gombos, webkit.review.bot
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proxy fix for localhost none

Description Laszlo Gombos 2011-10-07 02:34:09 PDT
http://localhost should not go trough proxy even if http_proxy environment variable is set. It seems that the current solution does not take localhost/127.0.0.1 into account; see http://trac.webkit.org/changeset/72080/trunk/WebKit2/WebProcess/qt/WebProcessMainQt.cpp.
Comment 1 Gopal Raghavan 2011-10-10 10:34:13 PDT
Created attachment 110366 [details]
proxy fix for localhost

Implemented checks in queryProxy to return QNetworkProxy::NoProxy for localhost and 127.0.0.1.
Not sure where the test cases are for proxy settings. If you have any suggestion, I can add a test case.
Comment 2 Chang Shu 2011-10-10 10:56:54 PDT
Comment on attachment 110366 [details]
proxy fix for localhost

Excellent patch! For perfection, you can possibly explore the option of replacing the "localhost" and "127.0.0.1" with some redefined Qt variables and whether we should go "CaseSensitive". But the patch is good to go.
Comment 3 Gopal Raghavan 2011-10-11 07:28:47 PDT
I grepped through qt5 refactored. I couldn't find a predefined for localhost. There are many occurrences of string. There is an enum under QHostAddress, but that might not be useful in this case.

Chrome, firefox etc., accept localhost and LOCALHOST. So, I think CaseInSensitive should be ok. Ofcourse the numbers dont need it.
Thanks
Comment 4 WebKit Review Bot 2011-10-11 09:12:17 PDT
Comment on attachment 110366 [details]
proxy fix for localhost

Clearing flags on attachment: 110366

Committed r97154: <http://trac.webkit.org/changeset/97154>
Comment 5 WebKit Review Bot 2011-10-11 09:12:22 PDT
All reviewed patches have been landed.  Closing bug.