Bug 47022

Summary: Add proxy server query function proxyServersForURL and change the Mac plug-in code to use it
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: ademar, ap, eric, mitz, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 34539    
Attachments:
Description Flags
Patch mitz: review+

Description Anders Carlsson 2010-10-01 15:20:11 PDT
Add proxy server query function proxyServersForURL annd change the Mafc plug-in code to use it
Comment 1 Anders Carlsson 2010-10-01 15:22:20 PDT
<rdar://problem/8504712>
Comment 2 Anders Carlsson 2010-10-01 15:24:55 PDT
Created attachment 69527 [details]
Patch
Comment 3 WebKit Review Bot 2010-10-01 15:26:06 PDT
Attachment 69527 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/platform/network/ProxyServer.cpp:65:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 1 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Eric Seidel (no email) 2010-10-01 15:36:51 PDT
Attachment 69527 [details] did not build on mac:
Build output: http://queues.webkit.org/results/4249001
Comment 5 mitz 2010-10-01 15:42:22 PDT
Comment on attachment 69527 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=69527&action=review

> WebCore/WebCore.xcodeproj/project.pbxproj:16513
> -			name = cf;
> +			path = cf;

Weird.

> WebCore/platform/network/ProxyServer.cpp:55
> +    builder.append(' ');

Is the trailing space is required by <http://web.archive.org/web/20060424005037/wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html>?

> WebCore/platform/network/ProxyServer.cpp:65
> +        if (i != 0)

No “!= 0” needed

> WebCore/platform/network/cf/ProxyServerCFNet.cpp:34
> +#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)

Can you put the special-case code after the normal case code?

> WebKit/ChangeLog:10
> +2010-10-01  Anders Carlsson  <andersca@apple.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Add proxy server query function proxyServersForURL and change the Mac plug-in code to use it
> +        https://bugs.webkit.org/show_bug.cgi?id=47022
> +        <rdar://problem/8504712>
> +
> +        * WebKit.xcodeproj/project.pbxproj:
> +

Please don’t check this in.

> WebKit/WebKit.xcodeproj/project.pbxproj:1677
> +			developmentRegion = English;

Ditto.
Comment 6 Anders Carlsson 2010-10-01 16:24:07 PDT
(In reply to comment #5)
> (From update of attachment 69527 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=69527&action=review
> 
> > WebCore/WebCore.xcodeproj/project.pbxproj:16513
> > -			name = cf;
> > +			path = cf;
> 
> Weird.

I changed the "cf" group to actually point to "cf".

> 
> > WebCore/platform/network/ProxyServer.cpp:55
> > +    builder.append(' ');
> 
> Is the trailing space is required by <http://web.archive.org/web/20060424005037/wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html>?

No, it's supposed to be a ':' and it's supposed to go before the port number. Fixed.

> 
> > WebCore/platform/network/ProxyServer.cpp:65
> > +        if (i != 0)
> 
> No “!= 0” needed
> 

Fixed.

> > WebCore/platform/network/cf/ProxyServerCFNet.cpp:34
> > +#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
> 
> Can you put the special-case code after the normal case code?
>

Yes.
Comment 7 Anders Carlsson 2010-10-01 16:28:53 PDT
Committed r68951: <http://trac.webkit.org/changeset/68951>
Comment 8 Alexey Proskuryakov 2010-11-09 19:56:15 PST
Do we really need entirely separate code for proxies in SocketStreamHandleCFNet.cpp and here?
Comment 9 Ademar Reis 2010-11-18 11:09:44 PST
Revision r68951 cherry-picked into qtwebkit-2.1 with commit 39e824c <http://gitorious.org/webkit/qtwebkit/commit/39e824c>