From 9f03463b4cc2ea90d7c334da2dc4da44f3b70748 Mon Sep 17 00:00:00 2001 From: Nytelife26 Date: Mon, 24 Jun 2024 23:38:53 +0100 Subject: [PATCH] fix: handle server-timing header merging --- cfspeedtest/cloudflare.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cfspeedtest/cloudflare.py b/cfspeedtest/cloudflare.py index 7a20775..682f796 100644 --- a/cfspeedtest/cloudflare.py +++ b/cfspeedtest/cloudflare.py @@ -192,7 +192,8 @@ def run_test(self, test: TestSpec) -> TestTimers: ) coll.full.append(time.time() - start) coll.server.append( - float(r.headers["Server-Timing"].split("=")[1]) / 1e3 + float(r.headers["Server-Timing"].split(",")[0].split("=")[1]) + / 1e3 ) coll.request.append( r.elapsed.seconds + r.elapsed.microseconds / 1e6