Changeset 291598 in webkit
- Timestamp:
- Mar 21, 2022, 8:28:05 PM (3 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r291591 r291598 1 2022-03-21 Alex Christensen <achristensen@webkit.org> 2 3 Adjust when _setPrivacyProxyFailClosedForUnreachableNonMainHosts is called 4 https://bugs.webkit.org/show_bug.cgi?id=237735 5 6 Reviewed by Geoff Garen. 7 8 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: 9 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): 10 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 11 (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): 12 (WebKit::NetworkSessionCocoa::createWebSocketTask): 13 1 14 2022-03-21 Aditya Keerthi <akeerthi@apple.com> 2 15 -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
r291234 r291598 340 340 RetainPtr<NSURLRequest> nsRequest = request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::UpdateHTTPBody); 341 341 RetainPtr<NSMutableURLRequest> mutableRequest = adoptNS([nsRequest.get() mutableCopy]); 342 343 if (parameters.isMainFrameNavigation 344 || parameters.hadMainFrameMainResourcePrivateRelayed // This means it did not fail. FIXME: adjust names to reflect this. 345 || !parameters.topOrigin 346 || request.url().host() == parameters.topOrigin->host()) { 347 if ([mutableRequest respondsToSelector:@selector(_setPrivacyProxyFailClosedForUnreachableNonMainHosts:)]) 348 [mutableRequest _setPrivacyProxyFailClosedForUnreachableNonMainHosts:YES]; 349 } 342 350 343 351 #if ENABLE(APP_PRIVACY_REPORT) -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r291234 r291598 932 932 NSURLSessionTaskTransactionMetrics *metrics = taskMetrics.transactionMetrics.lastObject; 933 933 #if HAVE(NETWORK_CONNECTION_PRIVACY_STANCE) 934 auto privateRelayed = metrics._privacyStance == nw_connection_privacy_stance_ direct? PrivateRelayed::No : PrivateRelayed::Yes;934 auto privateRelayed = metrics._privacyStance == nw_connection_privacy_stance_failed ? PrivateRelayed::No : PrivateRelayed::Yes; 935 935 #else 936 936 auto privateRelayed = PrivateRelayed::No; … … 1718 1718 #endif 1719 1719 1720 // FIXME: This function can make up to 3 copies of a request. 1721 // Reduce that to one if the protocol is null, the request isn't app initiated, 1722 // or the main frame main resource was private relayed, then set all properties 1723 // on the one copy. 1724 if (hadMainFrameMainResourcePrivateRelayed || request.url().host() == clientOrigin.topOrigin.host) { 1725 RetainPtr<NSMutableURLRequest> mutableRequest = adoptNS([nsRequest.get() mutableCopy]); 1726 if ([mutableRequest respondsToSelector:@selector(_setPrivacyProxyFailClosedForUnreachableNonMainHosts:)]) 1727 [mutableRequest _setPrivacyProxyFailClosedForUnreachableNonMainHosts:YES]; 1728 nsRequest = WTFMove(mutableRequest); 1729 } 1730 1720 1731 auto& sessionSet = sessionSetForPage(webPageProxyID); 1721 1732 RetainPtr<NSURLSessionWebSocketTask> task = [sessionSet.sessionWithCredentialStorage.session webSocketTaskWithRequest:nsRequest.get()];
Note:
See TracChangeset
for help on using the changeset viewer.