Repository navigation
End calls without a body at their head and let the pulse rest - #18
Merged
Merged
Conversation
|
This pull request adds no capability the code did not already have. 9 files read · 908 ms · against |
A response to a HEAD request, a 204, a 304 or an answer that says it is empty has nothing to read, and an app that only looks at the status never reads it, so nothing ended the call and it stayed pending with a duration that kept growing. The recorder now ends such a call when the head is reported. A redirect still waits, because a client may follow it and report the head of what it finds.
The recording dot, and the status and the time of a call that is still running, pulsed for as long as they were on screen, which kept the app drawing a frame on every refresh with nothing else changing. A pulse now beats three times when it appears, the recording dot beats again when the history changes, and then it holds still. It also no longer starts when the system asks for reduced motion, where it used to run without being seen.
tonytonycoder11
force-pushed
the
end-bodiless-calls-and-rest-the-pulse
branch
from
October 24, 2026 18:15
4ce1183 to
2f54ea9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A call whose response has no body stayed pending for as long as its client lived, with a duration that kept growing. A call used to end when the response stream did, and an app that only looks at the status never reads the stream. A 304 to a conditional request is the usual case, and a 204, the answer to a HEAD request and an answer that says it is empty are the others. Seen in an app that loads its images through a cache: the list filled with 304 rows that read 2 min 1 s and 0 B. A pending call also pulses, so each of those rows kept two animations running.
The recorder now ends a call when it is told the head of such a response: a HEAD request, a 204, a 304 or a content-length of 0. A redirect and a protocol switch are left open, because a client may follow the first and the second carries the bytes of the new protocol. The rule is in the recorder and not in the dart:io capture, so the package:http adapter, which hands its stream to the app the same way, gets it too. These calls now take part in the statistics and are written to disk, as every finished call is. Their duration is the time to the head.
The pulse repeated for as long as it was on screen, so an inspector that was open and idle still drew a frame on every refresh. It now beats three times when it appears and stops. The recording dot also listens to the history and beats again when it changes, so it moves while traffic flows and is still when none does. The same widget started its animation when the system asked for reduced motion and then did not show it, and it no longer does.
Nine tests in the capture suites and three for the inspector fail on main and pass here. Checked against httpbin.org over TLS: a HEAD, a 204, a 304 and an empty 200 end as completed, and a 64 byte body that nobody reads stays pending. The format check, the analyzer, the four test suites and the publish dry run pass locally. It was not run on a device.
What this does not change: a call with a body that the app never reads is still pending until its client is closed, when it is cancelled, and a redirect that the app neither follows nor reads waits the same way. Targets 1.1.0, as two Fixed entries in the changelog.