Subject: resourceTiming.nextHopProtocol reports"hq" - is that ok?

From: Lucas Pardue <[email-masked]>
Date: Mon, 12 Mar 2018 23:37:02 +0000

Hi,

TL;DR is that I see Chrome 64+ report the ALPN ID "hq" when I retrieve protocol information in client-side JavaScript. Is this ok?

Background
========
I was playing around on my site https://quic.stream which talks GQUIC 39, advertised with the Alt-Svc ALPN ID "quic".

My website previously used chrome.loadTimes() to detect the protocol, however things have moved on and now Chrome suggests I use  resourceTiming.nextHopProtocol() instead . So I updated my client code and was surprised to see that it now reports that I am talking "hq", rather than the previous string "http2+quic/39".

I created a thread on Google's proto-quic group [1] but Ryan Hamilton and I seem to disagree. Our discussion suggests that draft-ietf-quic-http-10 is a bit ambiguous, section 2.1.1 and 2.2.1 seem to be at odds. Ryan also kindly pointed out a w3c issue that touched on this topic [2].

Section 2.2.1 says:

   Only implementations of the final, published RFC can identify
   themselves as "hq".  Until such an RFC exists, implementations MUST
   NOT identify themselves using this string.

   Implementations of draft versions of the protocol MUST add the string
   "-" and the corresponding draft number to the identifier.  For
   example, draft-ietf-quic-http-01 is identified using the string "hq-
   01".

(FWIW, In the wild I see lots of "hq" being advertised, which seems to break this rule. )

So, is it ok to report "hq" in this case?

In my opinion, it would be really helpful to expose more information than just "hq" to JavaScript. As Yoav points out on [2], reducing fidelity of this data makes my life as a site operator harder when trying to gather protocol-related metrics.

Kind regards
Lucas

[1] https://groups.google.com/a/chromium.org/forum/#!topic/proto-quic/L5LkAg8VGZM
[2] https://github.com/w3c/navigation-timing/issues/71

-----------------------------
http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and
may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in
error, please delete it from your system.
Do not use, copy or disclose the
information in any way nor act in reliance on it and notify the sender
immediately.
Please note that the BBC monitors e-mails
sent or received.
Further communication will signify your consent to
this.
-----------------------------

---

From: Ryan Hamilton <[email-masked]>
Date: Tue, 13 Mar 2018 00:26:26 +0000

Just for reference, here's 2.1.1:

   For example, suppose a server supported both version 0x00000001 and
   the version rendered in ASCII as "Q034".  If it opted to include the
   reserved versions (from Section 4 of [QUIC-TRANSPORT]) 0x0 and
   0x1abadaba, it could specify the following header:

   Alt-Svc: hq=":49288";quic="1,1abadaba,51303334,0"

That suggests that if a server want to advertise HTTP over Google QUIC
Q034, it can use "hq" in the advertisement. Perhaps that's not the intent?

In any case, if we think that "hq" is the wrong identifier to be using in
the resource timing API, it would probably be a good idea for the WG to
clarify the issue with the w3c since I believe that's what drove the chrome
implementation.

Cheers,

Ryan

On Mon, Mar 12, 2018, 4:37 PM Lucas Pardue <[email-masked]> wrote:

> Hi,
>
>
> TL;DR is that I see Chrome 64+ report the ALPN ID "hq" when I retrieve
> protocol information in client-side JavaScript. Is this ok?
>
>
> Background
> ========
> I was playing around on my site https://quic.stream which talks GQUIC 39,
> advertised with the Alt-Svc ALPN ID "quic".
>
> My website previously used chrome.loadTimes() to detect the protocol,
> however things have moved on and now Chrome suggests I use
> resourceTiming.nextHopProtocol() instead . So I updated my client code and
> was surprised to see that it now reports that I am talking "hq", rather
> than the previous string "http2+quic/39".
>
> I created a thread on Google's proto-quic group [1] but Ryan Hamilton and
> I seem to disagree. Our discussion suggests that draft-ietf-quic-http-10 is
> a bit ambiguous, section 2.1.1 and 2.2.1 seem to be at odds. Ryan also
> kindly pointed out a w3c issue that touched on this topic [2].
>
> Section 2.2.1 says:
>
> In my opinion, it would be really helpful to expose more information than
> just "hq" to JavaScript. As Yoav points out on [2], reducing fidelity of
> this data makes my life as a site operator harder when trying to gather
> protocol-related metrics.
>
> Kind regards
> Lucas
>
> [1]
> https://groups.google.com/a/chromium.org/forum/#!topic/proto-quic/L5LkAg8VGZM