Title: [202356] trunk/Source/WebCore
Revision
202356
Author
[email protected]
Date
2016-06-22 16:23:46 -0700 (Wed, 22 Jun 2016)

Log Message

Integrate WebKit's CFURLConnection with App Transport Security
https://bugs.webkit.org/show_bug.cgi?id=159039
<rdar://problem/26953685>

Reviewed by Alex Christensen.

Pass additional options to NSURLConnect initialiser to identify that
this connection is for WebKit content loading.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (202355 => 202356)


--- trunk/Source/WebCore/ChangeLog	2016-06-22 22:56:56 UTC (rev 202355)
+++ trunk/Source/WebCore/ChangeLog	2016-06-22 23:23:46 UTC (rev 202356)
@@ -1,3 +1,17 @@
+2016-06-22  Oliver Hunt  <[email protected]>
+
+        Integrate WebKit's CFURLConnection with App Transport Security
+        https://bugs.webkit.org/show_bug.cgi?id=159039
+        <rdar://problem/26953685>
+
+        Reviewed by Alex Christensen.
+
+        Pass additional options to NSURLConnect initialiser to identify that
+        this connection is for WebKit content loading.
+
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::createNSURLConnection):
+
 2016-06-20  Jeremy Jones  <[email protected]>
 
         Adopt commitPriority to get rid of the 2 AVPL solution for PiP

Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (202355 => 202356)


--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm	2016-06-22 22:56:56 UTC (rev 202355)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm	2016-06-22 23:23:46 UTC (rev 202356)
@@ -226,6 +226,12 @@
 #if HAVE(TIMINGDATAOPTIONS)
     [propertyDictionary setObject:@{@"_kCFURLConnectionPropertyTimingDataOptions": @(_TimingDataOptionsEnableW3CNavigationTiming)} forKey:@"kCFURLConnectionURLConnectionProperties"];
 #endif
+    
+#if TARGET_OS_IPHONE || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+    // This is used to signal that to CFNetwork that this connection should be considered
+    // web content for purposes of App Transport Security.
+    [propertyDictionary setObject:@{@"NSAllowsArbitraryLoadsInWebContent": @""} forKey:(NSString *)_kCFURLConnectionPropertyATSContext];
+#endif
     d->m_connection = adoptNS([[NSURLConnection alloc] _initWithRequest:nsRequest delegate:delegate usesCache:usesCache maxContentLength:0 startImmediately:NO connectionProperties:propertyDictionary]);
 }
 

Modified: trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h (202355 => 202356)


--- trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h	2016-06-22 22:56:56 UTC (rev 202355)
+++ trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h	2016-06-22 23:23:46 UTC (rev 202356)
@@ -201,6 +201,7 @@
 #endif
 
 #if TARGET_OS_IPHONE || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+EXTERN_C const CFStringRef _kCFURLConnectionPropertyATSContext;
 EXTERN_C CFDataRef _CFNetworkCopyATSContext(void);
 EXTERN_C Boolean _CFNetworkSetATSContext(CFDataRef);
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to