⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 238785 in webkit


Ignore:
Timestamp:
Dec 1, 2018, 2:04:44 PM (8 years ago)
Author:
ap@apple.com
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:
Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r238772 r238785  
     12018-12-01  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Modernize version check for _suppressedAutoAddedHTTPHeaders
     4        https://bugs.webkit.org/show_bug.cgi?id=192175
     5
     6        Reviewed by Tim Horton.
     7
     8        * wtf/Platform.h:
     9
    1102018-11-30  Alex Christensen  <achristensen@webkit.org>
    211
  • trunk/Source/WTF/wtf/Platform.h

    r238747 r238785  
    14111411#define HAVE_CFNETWORK_WITH_IGNORE_HSTS 1
    14121412#endif
     1413
     1414#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302) || PLATFORM(IOS_FAMILY)
     1415#define HAVE_CFNETWORK_WITH_AUTO_ADDED_HTTP_HEADER_SUPPRESSION_SUPPORT 1
     1416/* FIXME: Does this work, and is this needed on other iOS family platforms? */
     1417#if PLATFORM(MAC) || PLATFORM(IOS)
     1418#define USE_CFNETWORK_AUTO_ADDED_HTTP_HEADER_SUPPRESSION 1
     1419#endif
     1420#endif
  • trunk/Source/WebCore/PAL/ChangeLog

    r238754 r238785  
     12018-12-01  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Modernize version check for _suppressedAutoAddedHTTPHeaders
     4        https://bugs.webkit.org/show_bug.cgi?id=192175
     5
     6        Reviewed by Tim Horton.
     7
     8        * pal/spi/cf/CFNetworkSPI.h: Curiously, it was forward declared twice, for no
     9        apparent reason.
     10
    1112018-11-30  Don Olmstead  <don.olmstead@sony.com>
    212
  • trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h

    r238747 r238785  
    6060#if defined(__OBJC__) && PLATFORM(COCOA)
    6161#import <CFNetwork/CFNSURLConnection.h>
    62 
    63 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101302
    64 @interface NSURLSessionConfiguration ()
    65 @property (nullable, copy) NSSet *_suppressedAutoAddedHTTPHeaders;
    66 @end
    67 #endif
    68 
    6962#endif
    7063
    … …  
    187180@property (nullable, copy) NSString *_CTDataConnectionServiceType;
    188181#endif
    189 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
     182#if HAVE(CFNETWORK_WITH_AUTO_ADDED_HTTP_HEADER_SUPPRESSION_SUPPORT)
    190183@property (nullable, copy) NSSet *_suppressedAutoAddedHTTPHeaders;
    191184#endif
  • trunk/Source/WebKit/ChangeLog

    r238777 r238785  
     12018-12-01  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Modernize version check for _suppressedAutoAddedHTTPHeaders
     4        https://bugs.webkit.org/show_bug.cgi?id=192175
     5
     6        Reviewed by Tim Horton.
     7
     8        * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
     9        Also removed selector check - we only need to support running on 10.13.0 when building
     10        with 10.13.0 SDK.
     11
    1122018-11-30  Alex Christensen  <achristensen@webkit.org>
    213
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm

    r238771 r238785  
    660660    NSURLSessionConfiguration *configuration = configurationForSessionID(m_sessionID);
    661661
    662 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
     662#if USE(CFNETWORK_AUTO_ADDED_HTTP_HEADER_SUPPRESSION)
    663663    // Without this, CFNetwork would sometimes add a Content-Type header to our requests (rdar://problem/34748470).
    664     if ([configuration respondsToSelector:@selector(_suppressedAutoAddedHTTPHeaders)])
    665         configuration._suppressedAutoAddedHTTPHeaders = [NSSet setWithObject:@"Content-Type"];
     664    configuration._suppressedAutoAddedHTTPHeaders = [NSSet setWithObject:@"Content-Type"];
    666665#endif
    667666
Note: See TracChangeset for help on using the changeset viewer.