Closed Bug 1460310 Opened 4 years ago Closed 4 years ago

Fix http version identifiers returned from nsAHttpConnection::Version

Categories

(Core :: Networking: HTTP, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: u408661, Assigned: u408661)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Generally speaking, nsAHttpConnection::Version should return one of the NS_HTTP_VERSION_# identifiers. But, in the case where we're running H2, we end up returning HTTP_VERSION_2 (=5) instead of NS_HTTP_VERSION_2_0 (=20). The HTTP_VERSION_2 value should really only be used to (1) indicate that a connection is spdy (we may be able to make this a bool in that case, too), and (2) as an identifier in the SpdyInfo table.

We should probably make nsAHttpConnection::Version return some sort of typed enum so that we don't accidentally get in this state again when we add a future protocol (When You Least Expect It!)
Attachment #8982623 - Flags: review?(mcmanus) → review?(dd.mozilla)
thought just occurred to me - as part of the review plz make sure that any constant used in telemetry is preserved
Comment on attachment 8982623 [details]
Bug 1460310 - Separate HTTP and SPDY identifiers into separate namespaces.

https://reviewboard.mozilla.org/r/248578/#review255594
Attachment #8982623 - Flags: review?(dd.mozilla) → review+
Pushed by hurley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6a6e61fb1666
Separate HTTP and SPDY identifiers into separate namespaces. r=dragana
https://hg.mozilla.org/mozilla-central/rev/6a6e61fb1666
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.