Darin Adler pointed out in https://bugs.webkit.org/show_bug.cgi?id=184335 that we might have subtle bugs in the ignore HSTS code due to type conversion. He also suggested moving non-SPI code out of the CFNetwork SPI header. This bug tracks that work.
<rdar://problem/39298238>
Created attachment 337565 [details] Patch
Comment on attachment 337565 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=337565&action=review > Source/WebCore/platform/network/mac/WebCoreURLResponse.mm:337 > + return [request respondsToSelector:@selector(_schemeWasUpgradedDueToDynamicHSTS)] > + && [request _schemeWasUpgradedDueToDynamicHSTS]; Should fix indentation of the second line, indent by 4 spaces. > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:189 > + return [request respondsToSelector:@selector(_schemeWasUpgradedDueToDynamicHSTS)] > + && [request _schemeWasUpgradedDueToDynamicHSTS]; Should fix indentation of the second line, indent by 4 spaces. > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:197 > + if ([request respondsToSelector:@selector(_setIgnoreHSTS:)]) { > + BOOL ignoreHSTSParameter = ignoreHSTS; > + [request _setIgnoreHSTS:ignoreHSTSParameter]; > + } This local BOOL is not needed here. It *was* needed for wtfObjcMsgSend, but here you can just pass the bool ignoreHSTS and it will be converted to a BOOL. Thus no braces needed either. > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:203 > + return [request respondsToSelector:@selector(_ignoreHSTS)] > + && [request _ignoreHSTS]; Should fix indentation of the second line, indent by 4 spaces.
Created attachment 337579 [details] Patch for landing
Thanks for the review and change suggestions, Darin!
Comment on attachment 337579 [details] Patch for landing Clearing flags on attachment: 337579 Committed r230467: <https://trac.webkit.org/changeset/230467>
All reviewed patches have been landed. Closing bug.