Re: Rationalise HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME

Daan De Meyer <daan.j.demeyer@gmail.com> Wed, 07 August 2019 14:05 UTC

Return-Path: <daan.j.demeyer@gmail.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 647A6120041 for <quic@ietfa.amsl.com>; Wed, 7 Aug 2019 07:05:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 XbbO-iaJzmW4 for <quic@ietfa.amsl.com>; Wed, 7 Aug 2019 07:05:28 -0700 (PDT)
Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (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 A86AD12003E for <quic@ietf.org>; Wed, 7 Aug 2019 07:05:28 -0700 (PDT)
Received: by mail-ot1-x334.google.com with SMTP id j19so28056506otq.2 for <quic@ietf.org>; Wed, 07 Aug 2019 07:05:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/ufVa1e0bcdbbf21QDS69Bq6PNQvEEZNBEdjFvUtSI0=; b=kjjP006Q4j3skB0ee5soUyJBfYtJrb4SnfcLA5FS5rl0MunIH4h2cneWGrJIJinOcV Kj6y4Yf/RDhD/U6oaErb4vYChwYXvG4dGJipxG20rHOz+qJTHxq7gLnEG1ttii7UfQQh +lV5b4WnBvmPpktypNzQJPQRWNjGTjs72nCHIx3d6tScd9CWHF1pR/1Zv9SLR2OMKlrJ URBufE1oH6TIZQKww0z/f+lfF7MhSZL0+E5iBdNGBKa+z7oHQjc9C3CFZ+gPowxtqHVA L4S5kEXZncts0K/jMxISS0RaVUmzCXrMCo8YPvVC4s/KYtaUcn0+V2i+hCw0bes+MBgE 4Jkw==
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:content-transfer-encoding; bh=/ufVa1e0bcdbbf21QDS69Bq6PNQvEEZNBEdjFvUtSI0=; b=gJEVn2JAczEyzFa0V2KOg+54FIFhkxVfn2iCp3EIlRNRDGWw04f34sC5JWwo1z723x Wmz3aWo4qjvwesReCm0Nzpi8IwQISQNeY049Yr01p4wjts6Nkcgnd8fW9NO5dZ6R9JiR rHf4HiIjp/Et4SQrpwue2jQGqOyVkNIVsAS4cKjUka/IanvCmKArMaeB3hTB8lz6hPL/ 1X4m1keSi76HGCvR9XjHg32W6HCBadAOOiQO8t9JilYtrirVocPNyzNd+XXAKJ0KtiSP /EXQRaHnh7/IsQCfldSg1wIbQnIY7f/IxlqlctHd0jcKRAZndoIKRabTBKahHRwF8B8U vrew==
X-Gm-Message-State: APjAAAWRSGTj8y9ic6GStXV5fXwcitqqIqKsTPgXJmYTZMu2XXxyS7Fl Pi3VwmJR0ZOq4Rnic1/lI1uWVLSQPsHamLZnXQg=
X-Google-Smtp-Source: APXvYqxVh7TALxLrXMtlTFdcjp6yye1lCh9EB1Cj7ifnbA6DgX3LWG5td4JWsHtDBQ8ArHo8oGb8Vt7JDw9F12bJ+ZA=
X-Received: by 2002:a5d:960f:: with SMTP id w15mr9355089iol.24.1565186727968; Wed, 07 Aug 2019 07:05:27 -0700 (PDT)
MIME-Version: 1.0
References: <CALGR9ob7=MzO5qt987dpBAxBqnsMRvkrgYz7svktKsMNNhjAdw@mail.gmail.com>
In-Reply-To: <CALGR9ob7=MzO5qt987dpBAxBqnsMRvkrgYz7svktKsMNNhjAdw@mail.gmail.com>
From: Daan De Meyer <daan.j.demeyer@gmail.com>
Date: Wed, 07 Aug 2019 16:05:17 +0200
Message-ID: <CAO8sHck2XYMiPZgndDm1Cc1xmvWQM=BQpK-+FJxM9g4XXy0FWw@mail.gmail.com>
Subject: Re: Rationalise HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME
To: Lucas Pardue <lucaspardue.24.7@gmail.com>
Cc: QUIC WG <quic@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/n1cwxlzDwjGo-xOXwoQVIjcMJd4>
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: Wed, 07 Aug 2019 14:05:30 -0000

(I accidentally only replied to Ian so I'm reposting to the entire list)

Is there a significant amount of added value by having both
HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME? If these errors will only
be used for debugging and compliance testing in practice, I think we
can definitely get away with just reporting HTTP_UNEXPECTED_FRAME
whenever a frame is received that isn't supposed to be received at
that point in the connection on that stream.

As a very minor nitpick, having only HTTP_UNEXPECTED_FRAME also
simplifies error handling in implementations as a default case can be
added on a switch on frame type that throws HTTP_UNEXPECTED_FRAME for
every frame type that isn't explicitly handled in the switch
statement. Currently, one has to differentiate between frame types
that should be reported as HTTP_WRONG_STREAM and frame types that
should be reported as HTTP_UNEXPECTED_FRAME.

My recommendation would be to replace all usages of HTTP_WRONG_STREAM
by HTTP_UNEXPECTED_FRAME as in my opinion having both does not add
significant value.

Regards,

Daan De Meyer

On Wed, 7 Aug 2019 at 02:03, Lucas Pardue <lucaspardue.24.7@gmail.com> wrote:
>
> Hello WG,
>
> As part of the HTTP error analysis and feedback, in June I created issue #2809 "Rationalise HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME" [1].
>
> In short, HTTP_WRONG_STREAM is used for connection errors when a non-allowed frame is received by a peer (e.g a server receiving PUSH_PROMISE), or when a request sequence is malformed. HTTP_UNEXPECTED_FRAME is used for connection errors when an allowed frame is received on the wrong type of stream (e.g. a client receiving PUSH_PROMISE on the control stream).
>
> Issue 2809 suggests combining these error codes but I've yet to make a PR. In the meantime, a fair amount of error code refactoring has taken place and I'm not sure how much demand there is for the change.
>
> If you have an opinion on this I'd appreciate feedback here or on the ticket.
>
> Cheers
> Lucas
>
> [1] https://github.com/quicwg/base-drafts/issues/2809