Re: HTTP/3 Preface (PRI method)

Ryan Hamilton <rch@google.com> Tue, 29 June 2021 20:05 UTC

Return-Path: <rch@google.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EF1F33A17DD for <quic@ietfa.amsl.com>; Tue, 29 Jun 2021 13:05:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.599
X-Spam-Level:
X-Spam-Status: No, score=-17.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3AI_VcONYpoL for <quic@ietfa.amsl.com>; Tue, 29 Jun 2021 13:05:57 -0700 (PDT)
Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1A4623A17DE for <quic@ietf.org>; Tue, 29 Jun 2021 13:05:56 -0700 (PDT)
Received: by mail-yb1-xb2d.google.com with SMTP id p22so905123yba.7 for <quic@ietf.org>; Tue, 29 Jun 2021 13:05:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tIk52bpBxbwip1IS+gFDTl8RKpO57cQk/uohnD9dMek=; b=s9DoA7wh69m/A4Chjfd+iYFPTFqF00J6r3SdNqPBf+b93MPPiXxqNYDcbNfe2WFmOE 8eobqaG1e9yXXgwNF7dRUtfBcDDL1S0tRga8G/hTUyJrpWydER4c/5LgxPF+0HVZEavc s3tUk/A5M1AOTHaE9EirDQkqnUJztx+Rm2LwBNI9ttYb7lxzBX1IgvYOROey/tlsMlKh h9IbqXo/GI/UIlbxeocRs0Qe85GeamVk6dnb3gA4baLlcHvGWR8qZt2NZlybkW9yHy7x zscJU1tciohVf776lslwrxSuYPpaj2mpLzMfhkU+LilV+CI0ljyDKWDZkSu7tgUcbLuB FseA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tIk52bpBxbwip1IS+gFDTl8RKpO57cQk/uohnD9dMek=; b=iIhOzeu2acMkjJPipjJxz5S0RE4V203a+VZaIfry/h6/frGVCHJHTNgr8aN1vtZExf OVf3LQFlFssOPkn+ezYE7pMFVyi5Tbz5n/7Cn1ywHjBBLgb84KbSEbUO1MmKJ5Nn6Ww2 LJaygIQJN+lU0kXCR/DvKv84tdaL9rPe4JY6GHjL7EwuiTTUG8Tfpaf7/qIrNABmqKIW 0770TaHmUrJ/ouzCfXA9tHs1AzE3Yuirda97yvhQEjYSddJPiWsSEjRZADE+0K4D//dD GIvUQyVNYqS2r4V2tJJyklgH5VJtw1vyHZzaNTjZdJcirxyhpdWxedklM5Nf34cFqkH2 F++Q==
X-Gm-Message-State: AOAM5315IIcT6JdzX+x21nkQN1CyWZUnpoPBt7EqIubHMg62YTfLGcOK guprGPT6VfHWaJNBYlv7CUtsD/wBdKNXGca7dK9BKA==
X-Google-Smtp-Source: ABdhPJycJF3kJjQHQLqd4H+S2nWCwI/BjT8sujq/Yt9rL65frv6OD7JESzm5xqxfsA1ZqqGvCeQazkSTBv9RaX1SQ9w=
X-Received: by 2002:a25:8081:: with SMTP id n1mr43874193ybk.253.1624997153087; Tue, 29 Jun 2021 13:05:53 -0700 (PDT)
MIME-Version: 1.0
References: <4723f90d822b18e3d0402b6496ac1d02@yocto.nu> <CADdTf+im9s_A4LXiwR15R=iLr6X8PJR=J3xq7302WWeGEiOy1A@mail.gmail.com> <fc1c52d95748524e5322c1b083ad1ade@yocto.nu>
In-Reply-To: <fc1c52d95748524e5322c1b083ad1ade@yocto.nu>
From: Ryan Hamilton <rch@google.com>
Date: Tue, 29 Jun 2021 13:05:40 -0700
Message-ID: <CAJ_4DfTG7vGPhfoAKwmwiBCU1NLprEgV7nVfpjaf_ww3S-XNoQ@mail.gmail.com>
Subject: Re: HTTP/3 Preface (PRI method)
To: ben=40yocto.nu@dmarc.ietf.org
Cc: Matt Joras <matt.joras@gmail.com>, IETF QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000126dfd05c5ed2265"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/y6xz2zOOp0UD9_aohRZloEKKI4Y>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 29 Jun 2021 20:06:00 -0000

HTTP/3 is defined to be HTTP over QUIC so HTTP/3 over TCP doesn't really
make sense.

On Tue, Jun 29, 2021 at 12:47 PM <ben=40yocto.nu@dmarc.ietf.org> wrote:

> I understand. When connecting through QUIC using TLS, it will tell me
> that HTTP/3 is used. However, I see HTTP/3 as protocol that isn't just
> allowed on QUIC, but also still on TCP, because QUIC is a
> TCP-alternative. So, we look to three cases:
>   - QUIC: use the ALPN code
>   - TCP/SSL: use ALPN code
>   - Plain TCP: What to do then? HTTP/3 directly starts with binary.
>
> It seems to me that HTTP should be developed like it is just an
> protocol, not specific made for QUIC or TCP. So in that case, there
> should be placed a preface somewhere.
>
> Matt Joras schreef op 2021-06-29 21:30:
>
> > Hi Ben,
> >
> > This issue in general, if I'm understanding you correctly, is solved
> > via the ALPN[1]. I.e., as part of the TLS handshake the server will be
> > able to know which application is being used. For example, "h2"
> > corresponds to HTTP/2 and "h3" corresponds to HTTP/3. Also note that
> > there are no standardized mappings of HTTP over QUIC except for the
> > currently-pending HTTP/3 specification. Future versions of HTTP over
> > QUIC would also be distinguished via ALPN, presumably.
> >
> > Best,
> > Matt Joras
> >
> > [1] https://datatracker.ietf.org/doc/html/rfc7301
> >
> > On Tue, Jun 29, 2021 at 12:11 PM <ben=40yocto.nu@dmarc.ietf.org> wrote:
> >
> >> Hello all,
> >>
> >> When reading about QUIC, it comes to me as a better alternative of
> >> TCP,
> >> build upon UDP.
> >> In this case, servers that run on TCP could easily also run on
> >> UDP/QUIC;
> >> think about DNS, SMTP, FTP.
> >>
> >> Now there is also a new version of HTTP. HTTP/3. This version will be
> >> transfered over QUIC by default.
> >> However, as I mentioned above, it could be possible to have "TCP
> >> protocols" that use QUIC too.
> >> That makes me think about also transfering some old HTTP versions, for
> >> example HTTP/0.9 (I came across a library that transfered HTTP/0.9
> >> over
> >> QUIC).
> >> But also HTTP/1.0, HTTP/1.1 and HTTP/2 are possible.
> >>
> >> All older HTTP versions send the following request line: <METHOD>
> >> <PATH>
> >> [VERSION] \n
> >> If an endpoint is directly accessed (without some negotiation), it
> >> will
> >> find out the version directly by reading the first line.
> >> For 0.9 the version will be absent. For 2.0 this will be a preface
> >> with
> >> a PRI method and * as path.
> >>
> >> When I think about running a HTTP server, I think about this:
> >>
> >> TCP (80) or TCP/SSL (443):
> >> - HTTP/0.9
> >> - HTTP/1.0
> >> - HTTP/1.1
> >> - HTTP/2.0
> >> - HTTP/3.0 (I think this is possible too)
> >>
> >> UDP/QUIC:
> >> - HTTP/0.9 (HTTP/0.9 but over QUIC)
> >> - HTTP/1.0 (HTTP/1.0 but over QUIC)
> >> - HTTP/1.1 (HTTP/1.1 but over QUIC)
> >> - HTTP/2.0 (HTTP/2.0 but over QUIC)
> >> - HTTP/3.0 (Default)
> >>
> >> However, if I listen for all versions on my HTTP-QUIC server, how am I
> >> supposed to know that it is HTTP/3? Does HTTP/3 has a preface? And if
> >> not, why not?
> >> I think the preface of HTTP/2 is great and I think it would be great
> >> in
> >> HTTP/3 too: PRI * HTTP/3.0
> >>
> >> I would like to see a preface added to HTTP/3.0. It is only 18 extra
> >> bytes at the beginning of the request. It could be ignored by some
> >> servers if they want, but for servers that want to have backwards
> >> compatibility it would be a great feature. (Luckily HTTP/3 is not a
> >> released standard yet.)
> >>
> >> Ben
>
>