Changeset 230538 in webkit
- Timestamp:
- Apr 11, 2018 11:15:03 AM (6 years ago)
- Location:
- branches/safari-605-branch/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-605-branch/Source/WebCore/ChangeLog
r230309 r230538 1 2018-04-10 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r230467. rdar://problem/39317878 4 5 Refactor Ignore HSTS code 6 https://bugs.webkit.org/show_bug.cgi?id=184433 7 <rdar://problem/39298238> 8 9 Reviewed by Darin Adler. 10 11 This patch refactors our ignore HSTS code. The convenience functions are moved 12 out of CFNetwork SPI in PAL, and into where they are used. It also switches 13 from performSelector: calls to straight function calls, after checking that 14 there is a responder. 15 16 Source/WebCore: 17 18 * platform/network/mac/WebCoreURLResponse.mm: 19 (WebCore::schemeWasUpgradedDueToDynamicHSTS): 20 Add convenience function here since it was moved out of 21 CFNetworkSPI.h. 22 23 Source/WebCore/PAL: 24 25 * pal/spi/cf/CFNetworkSPI.h: 26 (schemeWasUpgradedDueToDynamicHSTS): Deleted. 27 (setIgnoreHSTS): Deleted. 28 (ignoreHSTS): Deleted. 29 30 Source/WebKit: 31 32 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 33 (schemeWasUpgradedDueToDynamicHSTS): 34 (setIgnoreHSTS): 35 (ignoreHSTS): 36 Add convenience functions here since they were moved out of 37 CFNetworkSPI.h. 38 39 40 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230467 268f45cc-cd09-0410-ab3c-d52691b4dbfc 41 42 2018-04-09 John Wilander <wilander@apple.com> 43 44 Refactor Ignore HSTS code 45 https://bugs.webkit.org/show_bug.cgi?id=184433 46 <rdar://problem/39298238> 47 48 Reviewed by Darin Adler. 49 50 This patch refactors our ignore HSTS code. The convenience functions are moved 51 out of CFNetwork SPI in PAL, and into where they are used. It also switches 52 from performSelector: calls to straight function calls, after checking that 53 there is a responder. 54 55 * platform/network/mac/WebCoreURLResponse.mm: 56 (WebCore::schemeWasUpgradedDueToDynamicHSTS): 57 Add convenience function here since it was moved out of 58 CFNetworkSPI.h. 59 1 60 2018-04-05 Jason Marcell <jmarcell@apple.com> 2 61 -
branches/safari-605-branch/Source/WebCore/PAL/ChangeLog
r230341 r230538 1 2018-04-10 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r230467. rdar://problem/39317878 4 5 Refactor Ignore HSTS code 6 https://bugs.webkit.org/show_bug.cgi?id=184433 7 <rdar://problem/39298238> 8 9 Reviewed by Darin Adler. 10 11 This patch refactors our ignore HSTS code. The convenience functions are moved 12 out of CFNetwork SPI in PAL, and into where they are used. It also switches 13 from performSelector: calls to straight function calls, after checking that 14 there is a responder. 15 16 Source/WebCore: 17 18 * platform/network/mac/WebCoreURLResponse.mm: 19 (WebCore::schemeWasUpgradedDueToDynamicHSTS): 20 Add convenience function here since it was moved out of 21 CFNetworkSPI.h. 22 23 Source/WebCore/PAL: 24 25 * pal/spi/cf/CFNetworkSPI.h: 26 (schemeWasUpgradedDueToDynamicHSTS): Deleted. 27 (setIgnoreHSTS): Deleted. 28 (ignoreHSTS): Deleted. 29 30 Source/WebKit: 31 32 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 33 (schemeWasUpgradedDueToDynamicHSTS): 34 (setIgnoreHSTS): 35 (ignoreHSTS): 36 Add convenience functions here since they were moved out of 37 CFNetworkSPI.h. 38 39 40 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230467 268f45cc-cd09-0410-ab3c-d52691b4dbfc 41 42 2018-04-09 John Wilander <wilander@apple.com> 43 44 Refactor Ignore HSTS code 45 https://bugs.webkit.org/show_bug.cgi?id=184433 46 <rdar://problem/39298238> 47 48 Reviewed by Darin Adler. 49 50 This patch refactors our ignore HSTS code. The convenience functions are moved 51 out of CFNetwork SPI in PAL, and into where they are used. It also switches 52 from performSelector: calls to straight function calls, after checking that 53 there is a responder. 54 55 * pal/spi/cf/CFNetworkSPI.h: 56 (schemeWasUpgradedDueToDynamicHSTS): Deleted. 57 (setIgnoreHSTS): Deleted. 58 (ignoreHSTS): Deleted. 59 1 60 2018-04-06 Jason Marcell <jmarcell@apple.com> 2 61 -
branches/safari-605-branch/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
r230341 r230538 347 347 @end 348 348 349 static bool schemeWasUpgradedDueToDynamicHSTS(NSURLRequest *request)350 {351 if ([request respondsToSelector:@selector(_schemeWasUpgradedDueToDynamicHSTS)])352 return [request performSelector:@selector(_schemeWasUpgradedDueToDynamicHSTS)];353 return false;354 }355 356 static void setIgnoreHSTS(NSMutableURLRequest *request, bool ignoreHSTS)357 {358 if ([request respondsToSelector:@selector(_setIgnoreHSTS:)])359 [request performSelector:@selector(_setIgnoreHSTS:) withObject:[NSNumber numberWithBool:ignoreHSTS]];360 }361 362 static bool ignoreHSTS(NSURLRequest *request)363 {364 if ([request respondsToSelector:@selector(_ignoreHSTS)])365 return [request performSelector:@selector(_ignoreHSTS)];366 return false;367 }368 369 349 #endif // defined(__OBJC__) -
branches/safari-605-branch/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm
r224846 r230538 328 328 #endif 329 329 330 static bool schemeWasUpgradedDueToDynamicHSTS(NSURLRequest *request) 331 { 332 #if !USE(CFNETWORK_IGNORE_HSTS) 333 UNUSED_PARAM(request); 334 return false; 335 #else 336 return [request respondsToSelector:@selector(_schemeWasUpgradedDueToDynamicHSTS)] 337 && [request _schemeWasUpgradedDueToDynamicHSTS]; 338 #endif 339 } 340 330 341 NSURLResponse *synthesizeRedirectResponseIfNecessary(NSURLRequest *currentRequest, NSURLRequest *newRequest, NSURLResponse *redirectResponse) 331 342 { -
branches/safari-605-branch/Source/WebKit/ChangeLog
r229820 r230538 1 2018-04-10 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r230467. rdar://problem/39317878 4 5 Refactor Ignore HSTS code 6 https://bugs.webkit.org/show_bug.cgi?id=184433 7 <rdar://problem/39298238> 8 9 Reviewed by Darin Adler. 10 11 This patch refactors our ignore HSTS code. The convenience functions are moved 12 out of CFNetwork SPI in PAL, and into where they are used. It also switches 13 from performSelector: calls to straight function calls, after checking that 14 there is a responder. 15 16 Source/WebCore: 17 18 * platform/network/mac/WebCoreURLResponse.mm: 19 (WebCore::schemeWasUpgradedDueToDynamicHSTS): 20 Add convenience function here since it was moved out of 21 CFNetworkSPI.h. 22 23 Source/WebCore/PAL: 24 25 * pal/spi/cf/CFNetworkSPI.h: 26 (schemeWasUpgradedDueToDynamicHSTS): Deleted. 27 (setIgnoreHSTS): Deleted. 28 (ignoreHSTS): Deleted. 29 30 Source/WebKit: 31 32 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 33 (schemeWasUpgradedDueToDynamicHSTS): 34 (setIgnoreHSTS): 35 (ignoreHSTS): 36 Add convenience functions here since they were moved out of 37 CFNetworkSPI.h. 38 39 40 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230467 268f45cc-cd09-0410-ab3c-d52691b4dbfc 41 42 2018-04-09 John Wilander <wilander@apple.com> 43 44 Refactor Ignore HSTS code 45 https://bugs.webkit.org/show_bug.cgi?id=184433 46 <rdar://problem/39298238> 47 48 Reviewed by Darin Adler. 49 50 This patch refactors our ignore HSTS code. The convenience functions are moved 51 out of CFNetwork SPI in PAL, and into where they are used. It also switches 52 from performSelector: calls to straight function calls, after checking that 53 there is a responder. 54 55 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 56 (schemeWasUpgradedDueToDynamicHSTS): 57 (setIgnoreHSTS): 58 (ignoreHSTS): 59 Add convenience functions here since they were moved out of 60 CFNetworkSPI.h. 61 1 62 2018-03-21 Jason Marcell <jmarcell@apple.com> 2 63 -
branches/safari-605-branch/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r229038 r230538 181 181 return request; 182 182 } 183 184 static bool schemeWasUpgradedDueToDynamicHSTS(NSURLRequest *request) 185 { 186 return [request respondsToSelector:@selector(_schemeWasUpgradedDueToDynamicHSTS)] 187 && [request _schemeWasUpgradedDueToDynamicHSTS]; 188 } 189 190 static void setIgnoreHSTS(NSMutableURLRequest *request, bool ignoreHSTS) 191 { 192 if ([request respondsToSelector:@selector(_setIgnoreHSTS:)]) 193 [request _setIgnoreHSTS:ignoreHSTS]; 194 } 195 196 static bool ignoreHSTS(NSURLRequest *request) 197 { 198 return [request respondsToSelector:@selector(_ignoreHSTS)] 199 && [request _ignoreHSTS]; 200 } 183 201 #endif 184 202
Note: See TracChangeset
for help on using the changeset viewer.