<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[180183] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/180183">180183</a></dd>
<dt>Author</dt> <dd>jer.noble@apple.com</dd>
<dt>Date</dt> <dd>2015-02-16 16:02:44 -0800 (Mon, 16 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[iOS] Unable to play .mp4 file over http with basic http authentication
https://bugs.webkit.org/show_bug.cgi?id=141503
rdar://problem/15799844

Reviewed by Alexey Proskuryakov.

On iOS, CFNetwork is used for authentication, so the NSURLAuthenticationChallenge
provided by AVAssetResourceLoader needs to be shoehorned into a AuthenticationChallenge
object by way of CFURLAuthChallengeRef.

Create a new class, WebCoreNSURLAuthenticationChallengeClient, whose sole purpose
is to take AuthenticationChallengeClient callbacks and pass them along to a
NSURLAuthenticationChallenge sender.

Create a NSURLAuthenticationChallenge out of the CF version through an SPI, and add
that SPI to a new header. Drive-by fix: take two of our existing SPI calls and move
them into that same header.

* WebCore.xcodeproj/project.pbxproj: Add CFNSURLConnectionSPI.h to project.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Factory.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Simple constructor.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Pass to m_challenge.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Ditto.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Ditto.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Ditto.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
    Create an AuthenticationChallenge out of the nsChallenge and client and pass it up
    to the HTMLMediaElement.
* platform/network/mac/AuthenticationMac.mm:
* platform/spi/cocoa/CFNSURLConnectionSPI.h: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacAuthenticationMacmm">trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformspicocoaCFNSURLConnectionSPIh">trunk/Source/WebCore/platform/spi/cocoa/CFNSURLConnectionSPI.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (180182 => 180183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-02-16 23:46:33 UTC (rev 180182)
+++ trunk/Source/WebCore/ChangeLog        2015-02-17 00:02:44 UTC (rev 180183)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2015-02-16  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+        [iOS] Unable to play .mp4 file over http with basic http authentication
+        https://bugs.webkit.org/show_bug.cgi?id=141503
+        rdar://problem/15799844
+
+        Reviewed by Alexey Proskuryakov.
+
+        On iOS, CFNetwork is used for authentication, so the NSURLAuthenticationChallenge
+        provided by AVAssetResourceLoader needs to be shoehorned into a AuthenticationChallenge
+        object by way of CFURLAuthChallengeRef.
+
+        Create a new class, WebCoreNSURLAuthenticationChallengeClient, whose sole purpose
+        is to take AuthenticationChallengeClient callbacks and pass them along to a
+        NSURLAuthenticationChallenge sender.
+
+        Create a NSURLAuthenticationChallenge out of the CF version through an SPI, and add
+        that SPI to a new header. Drive-by fix: take two of our existing SPI calls and move
+        them into that same header.
+
+        * WebCore.xcodeproj/project.pbxproj: Add CFNSURLConnectionSPI.h to project.
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Factory.
+        (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Simple constructor.
+        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Pass to m_challenge.
+        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Ditto.
+        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Ditto.
+        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Ditto.
+        (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Ditto.
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
+            Create an AuthenticationChallenge out of the nsChallenge and client and pass it up
+            to the HTMLMediaElement.
+        * platform/network/mac/AuthenticationMac.mm:
+        * platform/spi/cocoa/CFNSURLConnectionSPI.h: Added.
+
</ins><span class="cx"> 2015-02-16  Said Abou-Hallawa  &lt;sabouhallawa@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Revert a change in SVGRenderSupport::mapLocalToContainer committed for fixing &lt;https://bugs.webkit.org/show_bug.cgi?id=119626&gt;.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (180182 => 180183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-02-16 23:46:33 UTC (rev 180182)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-02-17 00:02:44 UTC (rev 180183)
</span><span class="lines">@@ -13112,6 +13112,7 @@
</span><span class="cx">                 CD3E251B18046B0600E27F56 /* GridCoordinate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GridCoordinate.h; path = style/GridCoordinate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD3E252118046BCD00E27F56 /* CSSGridTemplateAreasValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSGridTemplateAreasValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD3E252218046BCD00E27F56 /* CSSGridTemplateAreasValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSGridTemplateAreasValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                CD4097FF1A8C855F004C65E9 /* CFNSURLConnectionSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFNSURLConnectionSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 CD4AC5281496AE2F0087C4EF /* Composite.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = Composite.wav; path = platform/audio/resources/Composite.wav; sourceTree = SOURCE_ROOT; };
</span><span class="cx">                 CD4E0AFA11F7BC27009D3811 /* fullscreen.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = fullscreen.css; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD52481818E200ED0008A07D /* DisplaySleepDisabler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisplaySleepDisabler.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16332,6 +16333,7 @@
</span><span class="cx">                                 CE1252461A16C2C200864480 /* NSPointerFunctionsSPI.h */,
</span><span class="cx">                                 CE1252521A1BEC0600864480 /* NSStringSPI.h */,
</span><span class="cx">                                 CE1252541A1BEC0E00864480 /* NSURLDownloadSPI.h */,
</span><ins>+                                CD4097FF1A8C855F004C65E9 /* CFNSURLConnectionSPI.h */,
</ins><span class="cx">                                 653EF83819A043AE0052202C /* NSURLFileTypeMappingsSPI.h */,
</span><span class="cx">                                 CE12523C1A1676CD00864480 /* QuartzCoreSPI.h */,
</span><span class="cx">                                 CEC337AC1A46071F009B8523 /* ServersSPI.h */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (180182 => 180183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2015-02-16 23:46:33 UTC (rev 180182)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2015-02-17 00:02:44 UTC (rev 180183)
</span><span class="lines">@@ -94,6 +94,10 @@
</span><span class="cx"> #import &lt;VideoToolbox/VideoToolbox.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(CFNETWORK)
+#include &quot;CFNSURLConnectionSPI.h&quot;
+#endif
+
</ins><span class="cx"> namespace std {
</span><span class="cx"> template &lt;&gt; struct iterator_traits&lt;HashSet&lt;RefPtr&lt;WebCore::MediaSelectionOptionAVFObjC&gt;&gt;::iterator&gt; {
</span><span class="cx">     typedef RefPtr&lt;WebCore::MediaSelectionOptionAVFObjC&gt; value_type;
</span><span class="lines">@@ -387,6 +391,58 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if USE(CFNETWORK)
+class WebCoreNSURLAuthenticationChallengeClient : public RefCounted&lt;WebCoreNSURLAuthenticationChallengeClient&gt;, public AuthenticationClient {
+public:
+    static RefPtr&lt;WebCoreNSURLAuthenticationChallengeClient&gt; create(NSURLAuthenticationChallenge *challenge)
+    {
+        return adoptRef(new WebCoreNSURLAuthenticationChallengeClient(challenge));
+    }
+
+    using RefCounted&lt;WebCoreNSURLAuthenticationChallengeClient&gt;::ref;
+    using RefCounted&lt;WebCoreNSURLAuthenticationChallengeClient&gt;::deref;
+
+private:
+    WebCoreNSURLAuthenticationChallengeClient(NSURLAuthenticationChallenge *challenge)
+        : m_challenge(challenge)
+    {
+        ASSERT(m_challenge);
+    }
+
+    virtual void refAuthenticationClient() override { ref(); }
+    virtual void derefAuthenticationClient() override { deref(); }
+
+    virtual void receivedCredential(const AuthenticationChallenge&amp;, const Credential&amp;)
+    {
+        [[m_challenge sender] useCredential:credential.nsCredential() forAuthenticationChallenge:m_challenge.get()];
+    }
+
+    virtual void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&amp;)
+    {
+        [[m_challenge sender] continueWithoutCredentialForAuthenticationChallenge:m_challenge.get()];
+    }
+
+    virtual void receivedCancellation(const AuthenticationChallenge&amp;)
+    {
+        [[m_challenge sender] cancelAuthenticationChallenge:m_challenge.get()];
+    }
+
+    virtual void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&amp;)
+    {
+        if ([[m_challenge sender] respondsToSelector:@selector(performDefaultHandlingForAuthenticationChallenge:)])
+            [[m_challenge sender] performDefaultHandlingForAuthenticationChallenge:m_challenge.get()];
+    }
+
+    virtual void receivedChallengeRejection(const AuthenticationChallenge&amp;)
+    {
+        if ([[m_challenge sender] respondsToSelector:@selector(rejectProtectionSpaceAndContinueWithChallenge:)])
+            [[m_challenge sender] rejectProtectionSpaceAndContinueWithChallenge:m_challenge.get()];
+    }
+
+    RetainPtr&lt;NSURLAuthenticationChallenge&gt; m_challenge;
+};
+#endif
+
</ins><span class="cx"> PassOwnPtr&lt;MediaPlayerPrivateInterface&gt; MediaPlayerPrivateAVFoundationObjC::create(MediaPlayer* player)
</span><span class="cx"> { 
</span><span class="cx">     return adoptPtr(new MediaPlayerPrivateAVFoundationObjC(player));
</span><span class="lines">@@ -1679,14 +1735,14 @@
</span><span class="cx"> bool MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge(NSURLAuthenticationChallenge* nsChallenge)
</span><span class="cx"> {
</span><span class="cx"> #if USE(CFNETWORK)
</span><del>-    UNUSED_PARAM(nsChallenge);
-    // FIXME: &lt;rdar://problem/15799844&gt;
-    return false;
</del><ins>+    RefPtr&lt;WebCoreNSURLAuthenticationChallengeClient&gt; client = WebCoreNSURLAuthenticationChallengeClient::create(nsChallenge);
+    RetainPtr&lt;CFURLAuthChallengeRef&gt; cfChallenge = adoptCF([nsChallenge _createCFAuthChallenge]);
+    AuthenticationChallenge challenge(cfChallenge.get(), client.get());
</ins><span class="cx"> #else
</span><span class="cx">     AuthenticationChallenge challenge(nsChallenge);
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     return player()-&gt;shouldWaitForResponseToAuthenticationChallenge(challenge);
</span><del>-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest(AVAssetResourceLoadingRequest* avRequest)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacAuthenticationMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm (180182 => 180183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm        2015-02-16 23:46:33 UTC (rev 180182)
+++ trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm        2015-02-17 00:02:44 UTC (rev 180183)
</span><span class="lines">@@ -33,17 +33,9 @@
</span><span class="cx"> #import &lt;Foundation/NSURLProtectionSpace.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if USE(CFNETWORK)
</span><del>-
-@interface NSURLAuthenticationChallenge (Details)
-#if PLATFORM(IOS)
-+(NSURLAuthenticationChallenge *)_createAuthenticationChallengeForCFAuthChallenge:(CFURLAuthChallengeRef)cfChallenge sender:(id &lt;NSURLAuthenticationChallengeSender&gt;)sender;
-#else
-+(NSURLAuthenticationChallenge *)_authenticationChallengeForCFAuthChallenge:(CFURLAuthChallengeRef)cfChallenge sender:(id &lt;NSURLAuthenticationChallengeSender&gt;)sender;
</del><ins>+#import &quot;CFNSURLConnectionSPI.h&quot;
</ins><span class="cx"> #endif
</span><del>-@end
</del><span class="cx"> 
</span><del>-#endif
-
</del><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="cx"> @interface WebCoreAuthenticationClientAsChallengeSender : NSObject &lt;NSURLAuthenticationChallengeSender&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformspicocoaCFNSURLConnectionSPIh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/spi/cocoa/CFNSURLConnectionSPI.h (0 => 180183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/cocoa/CFNSURLConnectionSPI.h                                (rev 0)
+++ trunk/Source/WebCore/platform/spi/cocoa/CFNSURLConnectionSPI.h        2015-02-17 00:02:44 UTC (rev 180183)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &lt;Foundation/NSObject.h&gt;
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#import &lt;CFNetwork/CFNSURLConnection.h&gt;
+
+#else
+
+@interface NSURLAuthenticationChallenge (Details)
+#if PLATFORM(IOS)
++(NSURLAuthenticationChallenge *)_createAuthenticationChallengeForCFAuthChallenge:(CFURLAuthChallengeRef)cfChallenge sender:(id &lt;NSURLAuthenticationChallengeSender&gt;)sender;
+#else
++(NSURLAuthenticationChallenge *)_authenticationChallengeForCFAuthChallenge:(CFURLAuthChallengeRef)cfChallenge sender:(id &lt;NSURLAuthenticationChallengeSender&gt;)sender;
+#endif
+-(CFURLAuthChallengeRef)_createCFAuthChallenge;
+@end
+
+#endif
</ins></span></pre>
</div>
</div>

</body>
</html>