Changeset 293591 in webkit


Ignore:
Timestamp:
Apr 28, 2022 3:21:42 PM (3 months ago)
Author:
commit-queue@webkit.org
Message:

Set top origin of CORS preflight requests
https://bugs.webkit.org/show_bug.cgi?id=239869
<rdar://92458995>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-04-28
Reviewed by Geoffrey Garen.

Since r293481 we establish two TCP connections to each domain that needs a CORS preflight request.
This is because we were calling _setPrivacyProxyFailClosedForUnreachableNonMainHosts for the CORS
preflight request but not the actual request after a successful CORS preflight check. They were
different because we weren't setting parameters.topOrigin for the CORS preflight request. Now we
are and the two requests can share a TCP connection once more.

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::startPreflight):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r293590 r293591  
     12022-04-28  Alex Christensen  <achristensen@webkit.org>
     2
     3        Set top origin of CORS preflight requests
     4        https://bugs.webkit.org/show_bug.cgi?id=239869
     5        <rdar://92458995>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Since r293481 we establish two TCP connections to each domain that needs a CORS preflight request.
     10        This is because we were calling _setPrivacyProxyFailClosedForUnreachableNonMainHosts for the CORS
     11        preflight request but not the actual request after a successful CORS preflight check.  They were
     12        different because we weren't setting parameters.topOrigin for the CORS preflight request.  Now we
     13        are and the two requests can share a TCP connection once more.
     14
     15        * NetworkProcess/NetworkCORSPreflightChecker.cpp:
     16        (WebKit::NetworkCORSPreflightChecker::startPreflight):
     17
    1182022-04-28  Per Arne Vollan  <pvollan@apple.com>
    219
  • trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp

    r289018 r293591  
    7676
    7777    loadParameters.webPageProxyID = m_parameters.webPageProxyID;
     78    loadParameters.topOrigin = m_parameters.topOrigin;
    7879
    7980    if (auto* networkSession = m_networkProcess->networkSession(m_parameters.sessionID)) {
Note: See TracChangeset for help on using the changeset viewer.