Changeset 240132 in webkit
- Timestamp:
- Jan 17, 2019, 2:54:23 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r240129 r240132 1 2019-01-17 Ross Kirsling <ross.kirsling@sony.com> 2 3 Unreviewed WinCairo fix -- hundreds of tests crash after r240031. 4 5 * platform/network/curl/ResourceHandleCurl.cpp: 6 (WebCore::ResourceHandle::createCurlRequest): 7 (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): 8 (WebCore::ResourceHandle::receivedCredential): 9 (WebCore::ResourceHandle::getCredential): 10 1 11 2019-01-17 John Wilander <wilander@apple.com> 2 12 -
trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp
r240032 r240132 146 146 addCacheValidationHeaders(request); 147 147 148 auto& storageSession = *context()->storageSession();148 auto& storageSession = NetworkStorageSession::defaultStorageSession(); 149 149 auto& cookieJar = storageSession.cookieStorage(); 150 150 auto includeSecureCookies = request.url().protocolIs("https") ? IncludeSecureCookies::Yes : IncludeSecureCookies::No; … … 232 232 if (challenge.failureResponse().httpStatusCode() == 401) 233 233 urlToStore = challenge.failureResponse().url(); 234 context()->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);234 NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore); 235 235 236 236 restartRequestWithCredential(challenge.protectionSpace(), credential); … … 247 247 // There is a race condition here, since a different credential might have already been stored by another ResourceHandle, 248 248 // but the observable effect should be very minor, if any. 249 context()->storageSession()->credentialStorage().remove(partition, challenge.protectionSpace());249 NetworkStorageSession::defaultStorageSession().credentialStorage().remove(partition, challenge.protectionSpace()); 250 250 } 251 251 252 252 if (!challenge.previousFailureCount()) { 253 Credential credential = context()->storageSession()->credentialStorage().get(partition, challenge.protectionSpace());253 Credential credential = NetworkStorageSession::defaultStorageSession().credentialStorage().get(partition, challenge.protectionSpace()); 254 254 if (!credential.isEmpty() && credential != d->m_initialCredential) { 255 255 ASSERT(credential.persistence() == CredentialPersistenceNone); 256 256 if (challenge.failureResponse().httpStatusCode() == 401) { 257 257 // Store the credential back, possibly adding it as a default for this directory. 258 context()->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), challenge.failureResponse().url());258 NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, challenge.protectionSpace(), challenge.failureResponse().url()); 259 259 } 260 260 … … 290 290 if (challenge.failureResponse().httpStatusCode() == 401) { 291 291 URL urlToStore = challenge.failureResponse().url(); 292 context()->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);292 NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore); 293 293 } 294 294 } … … 347 347 // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication, 348 348 // try and reuse the credential preemptively, as allowed by RFC 2617. 349 d->m_initialCredential = context()->storageSession()->credentialStorage().get(partition, request.url());349 d->m_initialCredential = NetworkStorageSession::defaultStorageSession().credentialStorage().get(partition, request.url()); 350 350 } else if (!redirect) { 351 351 // If there is already a protection space known for the URL, update stored credentials … … 353 353 // XMLHttpRequest with known incorrect credentials, and aborting it immediately (so that 354 354 // an authentication dialog doesn't pop up). 355 context()->storageSession()->credentialStorage().set(partition, credential, request.url());355 NetworkStorageSession::defaultStorageSession().credentialStorage().set(partition, credential, request.url()); 356 356 } 357 357 }
Note:
See TracChangeset
for help on using the changeset viewer.