Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5d070f22cea2972484e285c347a15d55e65725e3
      
https://github.com/WebKit/WebKit/commit/5d070f22cea2972484e285c347a15d55e65725e3
  Author: Youenn Fablet <youe...@gmail.com>
  Date:   2024-02-16 (Fri, 16 Feb 2024)

  Changed paths:
    M Source/WebCore/loader/cache/KeepaliveRequestTracker.cpp
    M Source/WebCore/loader/cache/KeepaliveRequestTracker.h

  Log Message:
  -----------
  Fetch keepalive quota should only be restored when the full response body is 
received
rdar://122492438
https://bugs.webkit.org/show_bug.cgi?id=269464

Reviewed by Alex Christensen.

As per spec, quota is computed according all fetch records in group whose 
request’s keepalive is true and done flag is unset.
The done flag is set when the body is fully received so we need to wait for the 
load to finish to update the quota.
We can therefore safely remove KeepaliveRequestTracker::responseReceived 
implementation, as
KeepaliveRequestTracker::notifyFinished will do the job.

Covered by keepalive WPT tests, for instance 
LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-keepalive-quota.html.

* Source/WebCore/loader/cache/KeepaliveRequestTracker.cpp:
(WebCore::KeepaliveRequestTracker::responseReceived): Deleted.
* Source/WebCore/loader/cache/KeepaliveRequestTracker.h:

Canonical link: https://commits.webkit.org/274808@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to