WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
225733
Resource Timing: secureConnectionStart == 0 when a connection is re-used
https://bugs.webkit.org/show_bug.cgi?id=225733
Summary
Resource Timing: secureConnectionStart == 0 when a connection is re-used
Nic Jansma
Reported
2021-05-12 22:07:40 PDT
When a TLS connection is re-used, the secureConnectionStart attribute returns 0. It should be set to the same as fetchStart, if a persistent connection is re-used, per:
https://www.w3.org/TR/resource-timing-1/#dom-performanceresourcetiming-secureconnectionstart
Example: { "name": "[some re-used TLS connection URL]", "entryType": "resource", "startTime": 121, "duration": 0, "initiatorType": "link", "nextHopProtocol": "", "workerStart": 0, "redirectStart": 0, "redirectEnd": 0, "fetchStart": 121, "domainLookupStart": 121, "domainLookupEnd": 121, "connectStart": 121, "connectEnd": 121, "secureConnectionStart": 0, "requestStart": 121, "responseStart": 121, "responseEnd": 121 } In the above example, secureConnectionStart should probably be 121 (the same as fetchStart, which is also what domainLookup* and connect* use). This can also be seen in WPT test failures: *
https://wpt.fyi/results/resource-timing/resource_connection_reuse_mixed_content.html?label=experimental&label=master&aligned
*
https://wpt.fyi/results/resource-timing?label=experimental&label=master&aligned
Attachments
Patch
(5.09 KB, patch)
2021-05-13 09:14 PDT
,
Alex Christensen
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(18.24 KB, patch)
2021-05-13 13:03 PDT
,
Alex Christensen
cdumez
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2021-05-13 09:14:42 PDT
Created
attachment 428519
[details]
Patch
Alex Christensen
Comment 2
2021-05-13 13:03:40 PDT
Created
attachment 428550
[details]
Patch
Alex Christensen
Comment 3
2021-05-13 13:24:10 PDT
@Nic, the spec should probably be clarified to say that fetchStart should not be used if the persistent connection was not secure.
Nic Jansma
Comment 4
2021-05-13 18:38:08 PDT
Wow, that was an amazingly fast fix. Thanks Alex! I'm not totally following on the spec clarification, mind if I bring this up at a future W3C WebPerf call? Great work, appreciated!
Alex Christensen
Comment 5
2021-05-14 09:07:40 PDT
I'm happy to discuss, but it's as simple as this: I had to only set secureConnectionStart to fetchStart if the protocol was HTTPS. If I did it for all protocols, tests like resource-timing/resource_connection_reuse.html start failing because they check that secureConnectionStart is 0 and it is often reusing an unencrypted TCP connection. Tests like resource-timing/resource_connection_reuse.https.html should start passing because of this change.
Chris Dumez
Comment 6
2021-05-14 09:49:20 PDT
Comment on
attachment 428550
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=428550&action=review
r=me
> Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm:33 > +static Box<WebCore::NetworkLoadMetrics> packageTimingData(double fetchStart, double domainLookupStart, double domainLookupEnd, double connectStart, double secureConnectionStart, double connectEnd, double requestStart, double responseStart, bool reusedTLSConnection, NSString *protocol)
WebCore:: should not be necessary.
> Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm:54 > +Box<WebCore::NetworkLoadMetrics> copyTimingData(NSURLSessionTaskTransactionMetrics *incompleteMetrics)
ditto.
Alex Christensen
Comment 7
2021-05-14 09:57:58 PDT
r277493
Nic Jansma
Comment 8
2021-05-15 11:20:37 PDT
@Alex ah yes that makes a lot of sense, thanks!
Alex Christensen
Comment 9
2023-10-04 17:41:04 PDT
***
Bug 205768
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug