Bug 69611 - [Qt] WebProcess using proxy settings for localhost as well
Summary: [Qt] WebProcess using proxy settings for localhost as well
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2011-10-07 02:34 PDT by Laszlo Gombos
Modified: 2011-10-11 09:12 PDT (History)
5 users (show)

See Also:


Attachments
proxy fix for localhost (1.73 KB, patch)
2011-10-10 10:34 PDT, Gopal Raghavan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.