Closed
Bug 1430713
Opened 6 years ago
Closed 4 years ago
Make sure we comply with the latest server-timing spec
Categories
(Core :: Networking: HTTP, enhancement, P3)
Core
Networking: HTTP
Tracking
()
RESOLVED
WONTFIX
Tracking | Status | |
---|---|---|
firefox59 | --- | affected |
People
(Reporter: kershaw, Assigned: kershaw)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
23.60 KB,
patch
|
Details | Diff | Splinter Review |
The spec says: "User agents MUST ignore extraneous characters found after a server-timing-param-value but before the next server-timing-param and before the end of the current server-timing-metric.". Our current code doesn't ignore extraneous characters after the current server-timing-metric. For example, for the case "metric== \"\"foo;dur=123.4", our code produces {"metric", "123.4", ""}. The correct result should be {"metric", "0", ""}.
Assignee | ||
Comment 1•6 years ago
|
||
Summary: This patch's focus is on the case when we found extraneous characters after the metric-name. If found, we can just stop parsing. I'd like to use the two examples below to explain this patch. Example 1: "metric== \"\"foo;dur=123.4" In this case, the first ParsedHeaderPair would be {"metric", "= \"\"foo"}. We can easily know by checking if the |mValue| is null or not. If not, this means we found '=' after the metric-name. Example 2: "metric \"\"foo ;dur=123.4" For this case, I modified the function |ParseNameAndValue| to return the param name before '"', which is "metric \"\"foo". And then check if we can find any invalid token character in "metric \"\"foo". If yes, we can ignore the characters after the invalid character. Please take a look. Thanks.
Attachment #8943277 -
Flags: review?(dd.mozilla)
Comment 2•6 years ago
|
||
(In reply to Kershaw Chang [:kershaw] from comment #0) > The spec says: "User agents MUST ignore extraneous characters found after a > server-timing-param-value but before the next server-timing-param and before > the end of the current server-timing-metric.". > > Our current code doesn't ignore extraneous characters after the current > server-timing-metric. > For example, for the case "metric== \"\"foo;dur=123.4", our code produces > {"metric", "123.4", ""}. The correct result should be {"metric", "0", ""}. i think our code is according to the spec. The test and result ({"metric", "0", ""}) is copied from chrome. We contacted chrome to double check, so that we have the same behavior. also see https://github.com/w3c/server-timing/issues/51
Updated•6 years ago
|
Attachment #8943277 -
Flags: review?(dd.mozilla)
Comment 3•6 years ago
|
||
(In reply to Kershaw Chang [:kershaw] from comment #1) > Created attachment 8943277 [details] [diff] [review] > patch > > Summary: > This patch's focus is on the case when we found extraneous characters after > the metric-name. If found, we can just stop parsing. > I'd like to use the two examples below to explain this patch. > > Example 1: "metric== \"\"foo;dur=123.4" > In this case, the first ParsedHeaderPair would be {"metric", "= \"\"foo"}. > We can easily know by checking if the |mValue| is null or not. If not, this > means we found '=' after the metric-name. > > Example 2: "metric \"\"foo ;dur=123.4" > For this case, I modified the function |ParseNameAndValue| to return the > param name before '"', which is "metric \"\"foo". And then check if we can > find any invalid token character in "metric \"\"foo". If yes, we can > ignore the characters after the invalid character. > > Please take a look. Thanks. The correct result for example 2 should be {"metric", "123.4", ""}.
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•4 years ago
|
||
Not sure about the current status now. Maybe this bug is already fixed.
Priority: P2 → P3
Assignee | ||
Comment 5•4 years ago
|
||
This bug probably is WONTFIX.
Please reopen if you think firefox doesn't comply with the spec.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•