fix: support new cfL4 Server-Timing header format#294
Merged
code-inflation merged 3 commits intocode-inflation:masterfrom Apr 4, 2026
Merged
fix: support new cfL4 Server-Timing header format#294code-inflation merged 3 commits intocode-inflation:masterfrom
code-inflation merged 3 commits intocode-inflation:masterfrom
Conversation
Owner
|
thanks for your contribution |
Author
|
Thanks for your work!
Daniel
…On Sat, Apr 4, 2026, 11:15 PM Robin Bürgi ***@***.***> wrote:
*code-inflation* left a comment (code-inflation/cfspeedtest#294)
<#294 (comment)>
thanks for your contribution
—
Reply to this email directly, view it on GitHub
<#294 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD7JH3KFJKPKB4SREBT6ET4UGCORAVCNFSM6AAAAACXMVGKBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCOBXHAZTGMJZGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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.
Fixes #286, refs #288.
Cloudflare changed the Server-Timing header from
cfRequestDuration;dur=<ms>tocfL4;desc="?proto=TCP&rtt=<us>&...", which panics the latency test. This adds a fallback parser for the new format and replaces the unwrap chain with graceful error handling. Falls back to raw round-trip time if neither format matches. Request failures are skipped rather than counted as 0.0.Public API unchanged (
test_latency() -> f64). Removed deadWARNED_NEGATIVE_LATENCYstatic. 9 new tests.