RE: Rationalise HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME

Mike Bishop <mbishop@evequefou.be> Thu, 08 August 2019 19:15 UTC

Return-Path: <mbishop@evequefou.be>
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 74C5712019C for <quic@ietfa.amsl.com>; Thu, 8 Aug 2019 12:15:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.89
X-Spam-Level:
X-Spam-Status: No, score=-1.89 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=evequefou.onmicrosoft.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 RcfDS23OvEmy for <quic@ietfa.amsl.com>; Thu, 8 Aug 2019 12:15:52 -0700 (PDT)
Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-eopbgr750132.outbound.protection.outlook.com [40.107.75.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 61078120192 for <quic@ietf.org>; Thu, 8 Aug 2019 12:15:51 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k74qmDwCgus5ZE2jv7YlsJ6QaHoD92wZkDB/41m6PSll3yM7jXGG6ejNyEMhUDEoqZXAwzKS933c45ezokBooUEJ1ZsXxU31+E1J+Od93ce01Ht6wnOChXP5LM4mp5EcVE9TOuPxLvHBA5wUeX/7TTw/bzJ/B6meMnPvzOx2D1jGWBa0WeJ3x6PZsMI1QcBdfdM0AUaZIEtCrhjbeO8WY8f4PREGisne+6gyKQUQHda2AZ9tW7HFQ127GVWosYq6+8n/8tx6ymDQnYXAcgPde2aHFZWiLO8CgLSMfF3lUS9IYt0iXWiCESYpC0CotvdGi7I7JJEUowepm/DXFChy4w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dyXG5rNUDdi/bffVmFKirxGWY7W34+PI0S6v796HedY=; b=PG1d/mCngZVKgy+XC3Gr/vFM4xyjaZWJjftLjWHRTfGTzau9UcON8YEFieFzrwacMRzR8n9eUXmOCaiOKVlRyZtPuyPgMA5C3tirOfne+fZWNCpUHydPkAGiB53uolTl134dmWWCZ+insG9R3Ry1GXb+KsYHhL1w0VMMuNnfQt9xK2UekgHMl5gijXSp3Mh6ygGRA2LfiYyXimKbxb7+gvl1kD6DPJBbY2Ymu7owb5X3ysQ1rj3iakbm/jdtGrqAKeGwh2eFGmLHWQMeMoUENJwmNIsMvpXVFc78NHWzkwdJuZzPPTlDdWORdZkUWpIUhISi9QulHL9dBuLV52x5kg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=evequefou.be;dmarc=pass action=none header.from=evequefou.be;dkim=pass header.d=evequefou.be;arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evequefou.onmicrosoft.com; s=selector2-evequefou-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dyXG5rNUDdi/bffVmFKirxGWY7W34+PI0S6v796HedY=; b=MZ0gyQk8yagccK3dqH2rFZvs8id8hbJe0DLdDyjTHeD6oJPjDX/4ITsDL0qWrvSZw/lasMjxcC47lcoLGfhO/rp/nAJI7flDCIFYCG7H129PXcZZOURI1SOIycNinV1BYI8nPtj/jLi3P9wN1WN3Zkdj5QMFvLcAuMfCC3IkJWw=
Received: from CY4PR22MB0983.namprd22.prod.outlook.com (10.171.164.151) by CY4PR22MB0456.namprd22.prod.outlook.com (10.173.195.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.20; Thu, 8 Aug 2019 19:15:49 +0000
Received: from CY4PR22MB0983.namprd22.prod.outlook.com ([fe80::4190:c9d6:bf3f:2432]) by CY4PR22MB0983.namprd22.prod.outlook.com ([fe80::4190:c9d6:bf3f:2432%4]) with mapi id 15.20.2157.015; Thu, 8 Aug 2019 19:15:48 +0000
From: Mike Bishop <mbishop@evequefou.be>
To: Daan De Meyer <daan.j.demeyer@gmail.com>, Lucas Pardue <lucaspardue.24.7@gmail.com>
CC: QUIC WG <quic@ietf.org>
Subject: RE: Rationalise HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME
Thread-Topic: Rationalise HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME
Thread-Index: AQHVTLOC2OqR449G9kmbKW6d1/yIBKbvuOCAgAHkLdA=
Date: Thu, 08 Aug 2019 19:15:48 +0000
Message-ID: <CY4PR22MB09839B9D42D8DD8AB087FDDBDAD70@CY4PR22MB0983.namprd22.prod.outlook.com>
References: <CALGR9ob7=MzO5qt987dpBAxBqnsMRvkrgYz7svktKsMNNhjAdw@mail.gmail.com> <CAO8sHck2XYMiPZgndDm1Cc1xmvWQM=BQpK-+FJxM9g4XXy0FWw@mail.gmail.com>
In-Reply-To: <CAO8sHck2XYMiPZgndDm1Cc1xmvWQM=BQpK-+FJxM9g4XXy0FWw@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=mbishop@evequefou.be;
x-originating-ip: [2600:2b00:9323:fe01:b9d1:269e:154e:50a9]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 57081c41-68b9-4d82-9eb4-08d71c34d263
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:CY4PR22MB0456;
x-ms-traffictypediagnostic: CY4PR22MB0456:
x-ms-exchange-purlcount: 3
x-microsoft-antispam-prvs: <CY4PR22MB045628CCACBE067233FD62ADDAD70@CY4PR22MB0456.namprd22.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:6430;
x-forefront-prvs: 012349AD1C
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(39830400003)(346002)(366004)(376002)(136003)(13464003)(55674003)(189003)(199004)(5660300002)(7736002)(81156014)(71190400001)(71200400001)(74316002)(76176011)(8676002)(81166006)(8936002)(52536014)(14444005)(256004)(229853002)(7696005)(53546011)(6506007)(102836004)(86362001)(316002)(110136005)(99286004)(6246003)(4326008)(53936002)(25786009)(6436002)(9686003)(54896002)(6306002)(55016002)(236005)(186003)(76116006)(14454004)(66946007)(606006)(64756008)(66556008)(66446008)(66476007)(33656002)(966005)(6116002)(790700001)(2906002)(508600001)(46003)(11346002)(476003)(486006)(446003); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR22MB0456; H:CY4PR22MB0983.namprd22.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: evequefou.be does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: jsNwau3c986M0/wJzCKSGAvyeWdZHRwIsalXXa0upqJlhDkU8PU+v4KW5UwwDvlVaodmUaWiZinicBhs5ueu9Mqv4+T1Pe+gWOYGUO890wPRehJLqBmTqy09U5pDSjAr3+SEG2TIczPmYSkqx9aNPr90LR6ICC2W5AqpM3xBkcomrQlN7YWRsvhPJLuSoH1PP/5eC0QGbJgTekX5Uhx2lnhbI577sD+MBH5UAGv7gmjCO5klaJL00vxcej8i94CHWLkklRt9pR/2pqvs75X/k42o2zS7c1k2gNl3D+/s5EqiLtqpC7xdoxe0lMzxv7yYEjH7V3Q8GgyHb71uFoJ0Fg+rFS8H0SeQA+WvMykMDI3B9rAvIDJ7l3mZRvMAE7BKCWG56x+fmupoMWKRJP1E8xXmiQqApUJSdG0a4tns+Bw=
Content-Type: multipart/alternative; boundary="_000_CY4PR22MB09839B9D42D8DD8AB087FDDBDAD70CY4PR22MB0983namp_"
MIME-Version: 1.0
X-OriginatorOrg: evequefou.be
X-MS-Exchange-CrossTenant-Network-Message-Id: 57081c41-68b9-4d82-9eb4-08d71c34d263
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Aug 2019 19:15:48.8176 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 41eaf50b-882d-47eb-8c4c-0b5b76a9da8f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: iGG5rNJO7E3Y8xdcVLgfKpROAm+CqkmkqgS7N8dzAnXx7IhI/JeLcOaEqiGykrBT4Ic0OTvS5/nx2AnTtt10Wg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR22MB0456
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/GngkSDGazMX-ER_46WKwS-FIfq8>
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: Thu, 08 Aug 2019 19:15:56 -0000

That would be a dangerous coding pattern.  You're required to ignore frames you don’t understand -- that's what allows unnegotiated extension frames.  These error codes are explicitly for frames that you *do* understand and therefore know that they shouldn't be used in the way they are.



-----Original Message-----
From: QUIC <quic-bounces@ietf.org> On Behalf Of Daan De Meyer
Sent: Wednesday, August 7, 2019 10:05 AM
To: Lucas Pardue <lucaspardue.24.7@gmail.com>
Cc: QUIC WG <quic@ietf.org>
Subject: Re: Rationalise HTTP_WRONG_STREAM and HTTP_UNEXPECTED_FRAME



(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<mailto: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