Title: [238785] trunk/Source
Revision
238785
Author
[email protected]
Date
2018-12-01 14:04:44 -0800 (Sat, 01 Dec 2018)

Log Message

Modernize version check for _suppressedAutoAddedHTTPHeaders
https://bugs.webkit.org/show_bug.cgi?id=192175

Reviewed by Tim Horton.

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h: Curiously, it was forward declared twice, for no
apparent reason.

Source/WebKit:

* NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
Also removed selector check - we only need to support running on 10.13.0 when building
with 10.13.0 SDK.

Source/WTF:

* wtf/Platform.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (238784 => 238785)


--- trunk/Source/WTF/ChangeLog	2018-12-01 21:09:08 UTC (rev 238784)
+++ trunk/Source/WTF/ChangeLog	2018-12-01 22:04:44 UTC (rev 238785)
@@ -1,3 +1,12 @@
+2018-12-01  Alexey Proskuryakov  <[email protected]>
+
+        Modernize version check for _suppressedAutoAddedHTTPHeaders
+        https://bugs.webkit.org/show_bug.cgi?id=192175
+
+        Reviewed by Tim Horton.
+
+        * wtf/Platform.h:
+
 2018-11-30  Alex Christensen  <[email protected]>
 
         Fix Windows build after r238771

Modified: trunk/Source/WTF/wtf/Platform.h (238784 => 238785)


--- trunk/Source/WTF/wtf/Platform.h	2018-12-01 21:09:08 UTC (rev 238784)
+++ trunk/Source/WTF/wtf/Platform.h	2018-12-01 22:04:44 UTC (rev 238785)
@@ -1410,3 +1410,11 @@
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || PLATFORM(IOS_FAMILY)
 #define HAVE_CFNETWORK_WITH_IGNORE_HSTS 1
 #endif
+
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302) || PLATFORM(IOS_FAMILY)
+#define HAVE_CFNETWORK_WITH_AUTO_ADDED_HTTP_HEADER_SUPPRESSION_SUPPORT 1
+/* FIXME: Does this work, and is this needed on other iOS family platforms? */
+#if PLATFORM(MAC) || PLATFORM(IOS)
+#define USE_CFNETWORK_AUTO_ADDED_HTTP_HEADER_SUPPRESSION 1
+#endif
+#endif

Modified: trunk/Source/WebCore/PAL/ChangeLog (238784 => 238785)


--- trunk/Source/WebCore/PAL/ChangeLog	2018-12-01 21:09:08 UTC (rev 238784)
+++ trunk/Source/WebCore/PAL/ChangeLog	2018-12-01 22:04:44 UTC (rev 238785)
@@ -1,3 +1,13 @@
+2018-12-01  Alexey Proskuryakov  <[email protected]>
+
+        Modernize version check for _suppressedAutoAddedHTTPHeaders
+        https://bugs.webkit.org/show_bug.cgi?id=192175
+
+        Reviewed by Tim Horton.
+
+        * pal/spi/cf/CFNetworkSPI.h: Curiously, it was forward declared twice, for no
+        apparent reason.
+
 2018-11-30  Don Olmstead  <[email protected]>
 
         Rename ENABLE_SUBTLE_CRYPTO to ENABLE_WEB_CRYPTO

Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (238784 => 238785)


--- trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2018-12-01 21:09:08 UTC (rev 238784)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2018-12-01 22:04:44 UTC (rev 238785)
@@ -59,15 +59,8 @@
 // FIXME: Remove the defined(__OBJC__)-guard once we fix <rdar://problem/19033610>.
 #if defined(__OBJC__) && PLATFORM(COCOA)
 #import <CFNetwork/CFNSURLConnection.h>
-
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101302
-@interface NSURLSessionConfiguration ()
-@property (nullable, copy) NSSet *_suppressedAutoAddedHTTPHeaders;
-@end
 #endif
 
-#endif
-
 #else // !PLATFORM(WIN) && !USE(APPLE_INTERNAL_SDK)
 
 typedef CF_ENUM(int64_t, _TimingDataOptions)
@@ -186,7 +179,7 @@
 #if PLATFORM(IOS_FAMILY)
 @property (nullable, copy) NSString *_CTDataConnectionServiceType;
 #endif
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if HAVE(CFNETWORK_WITH_AUTO_ADDED_HTTP_HEADER_SUPPRESSION_SUPPORT)
 @property (nullable, copy) NSSet *_suppressedAutoAddedHTTPHeaders;
 #endif
 #if PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED >= 60000

Modified: trunk/Source/WebKit/ChangeLog (238784 => 238785)


--- trunk/Source/WebKit/ChangeLog	2018-12-01 21:09:08 UTC (rev 238784)
+++ trunk/Source/WebKit/ChangeLog	2018-12-01 22:04:44 UTC (rev 238785)
@@ -1,3 +1,14 @@
+2018-12-01  Alexey Proskuryakov  <[email protected]>
+
+        Modernize version check for _suppressedAutoAddedHTTPHeaders
+        https://bugs.webkit.org/show_bug.cgi?id=192175
+
+        Reviewed by Tim Horton.
+
+        * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
+        Also removed selector check - we only need to support running on 10.13.0 when building
+        with 10.13.0 SDK.
+
 2018-11-30  Alex Christensen  <[email protected]>
 
         Fix Windows build.

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (238784 => 238785)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2018-12-01 21:09:08 UTC (rev 238784)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2018-12-01 22:04:44 UTC (rev 238785)
@@ -659,10 +659,9 @@
 
     NSURLSessionConfiguration *configuration = configurationForSessionID(m_sessionID);
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
+#if USE(CFNETWORK_AUTO_ADDED_HTTP_HEADER_SUPPRESSION)
     // Without this, CFNetwork would sometimes add a Content-Type header to our requests (rdar://problem/34748470).
-    if ([configuration respondsToSelector:@selector(_suppressedAutoAddedHTTPHeaders)])
-        configuration._suppressedAutoAddedHTTPHeaders = [NSSet setWithObject:@"Content-Type"];
+    configuration._suppressedAutoAddedHTTPHeaders = [NSSet setWithObject:@"Content-Type"];
 #endif
 
     if (parameters.allowsCellularAccess == AllowsCellularAccess::No)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to