RE: can h2 extension frames carry data?

Mike Bishop <Michael.Bishop@microsoft.com> Mon, 02 November 2015 16:16 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BACFA1B491E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 2 Nov 2015 08:16:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.011
X-Spam-Level:
X-Spam-Status: No, score=-7.011 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 iFH1iUy4tFU2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 2 Nov 2015 08:16:51 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 766701B490E for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 2 Nov 2015 08:16:50 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ZtHiu-0000ka-36 for ietf-http-wg-dist@listhub.w3.org; Mon, 02 Nov 2015 16:12:44 +0000
Resent-Date: Mon, 02 Nov 2015 16:12:44 +0000
Resent-Message-Id: <E1ZtHiu-0000ka-36@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <Michael.Bishop@microsoft.com>) id 1ZtHim-0000jk-MP for ietf-http-wg@listhub.w3.org; Mon, 02 Nov 2015 16:12:36 +0000
Received: from mail-bl2on0118.outbound.protection.outlook.com ([65.55.169.118] helo=na01-bl2-obe.outbound.protection.outlook.com) by maggie.w3.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from <Michael.Bishop@microsoft.com>) id 1ZtHij-00063R-CQ for ietf-http-wg@w3.org; Mon, 02 Nov 2015 16:12:35 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6/fNjFRQEDv4z1ZuxA6vbqoEBi1O2R5NxnVE4AETG1E=; b=ZcNrXtZ7eI7XvkhlX2voPx+tE3tpD3i8aU212q+8Rp1hSzzVBwWOxX4Bg7JDDqQh+AyaH621rTpUccsZUq+/YVOsf7vs6pBhl57YB+gt0U9bq4MhrylXg3XRuhQAGNsZ0HGBAFylTvCPCRvJ+HX9LULzoIC65BjsL3bsQ2a1CKo=
Received: from CY1PR03MB1374.namprd03.prod.outlook.com (10.163.16.28) by CY1PR03MB1373.namprd03.prod.outlook.com (10.163.16.27) with Microsoft SMTP Server (TLS) id 15.1.312.18; Mon, 2 Nov 2015 16:12:05 +0000
Received: from CY1PR03MB1374.namprd03.prod.outlook.com ([10.163.16.28]) by CY1PR03MB1374.namprd03.prod.outlook.com ([10.163.16.28]) with mapi id 15.01.0312.014; Mon, 2 Nov 2015 16:12:04 +0000
From: Mike Bishop <Michael.Bishop@microsoft.com>
To: Matthew Kerwin <matthew@kerwin.net.au>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Thread-Topic: can h2 extension frames carry data?
Thread-Index: AQHRFWTpv2dt6gugik6PkSADUhqDeJ6I5VJA
Date: Mon, 02 Nov 2015 16:12:04 +0000
Message-ID: <CY1PR03MB137482B10A7FC5A830A62FAE872C0@CY1PR03MB1374.namprd03.prod.outlook.com>
References: <CACweHNDNr9aXnguiZ4eV=RrMWXacuVSg8C+P3k==jiefdf_jZw@mail.gmail.com>
In-Reply-To: <CACweHNDNr9aXnguiZ4eV=RrMWXacuVSg8C+P3k==jiefdf_jZw@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=Michael.Bishop@microsoft.com;
x-originating-ip: [118.243.125.63]
x-microsoft-exchange-diagnostics: 1; CY1PR03MB1373; 5:mmEXUm05AVO+/NfGVMn3oZyumSItNz2FEeiMU3V6r2sSmZYjiLw/pQHHP/90qX3ua489LuAooxN5LcwmkEJ00Kld7j/+OG1fzh591BOWJ4dKjtehv+pjxZbnUHAJrpTFjkWlsZih0lWb+Hiq7M7eNQ==; 24:AzxDVQGSCWbE72S2E67J73bJeS1sJgkoEwVfav5djpC3BbXCTpyYZJJkNBe2s0CVfr2CSp5MaMckhyqEXO/3iyegXAr2HqF376/QWFxyg7g=; 20:FfN/lGt9u7eeYc+Dbsg4IgckOzXtofxSTTzPx6nhMRkIZB699Q5tI65ybehFb9+I6BUz3QTrc4KZV4bddE86Wg==
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1373;
x-microsoft-antispam-prvs: <CY1PR03MB137351C0C337FCD97D2E8E92872C0@CY1PR03MB1373.namprd03.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(108003899814671);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425024)(601004)(2401047)(8121501046)(5005006)(520078)(3002001)(10201501046)(61426024)(61427024); SRVR:CY1PR03MB1373; BCL:0; PCL:0; RULEID:; SRVR:CY1PR03MB1373;
x-forefront-prvs: 0748FF9A04
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(377454003)(189002)(199003)(74316001)(19300405004)(19580395003)(19625215002)(19580405001)(19617315012)(92566002)(105586002)(86362001)(66066001)(19609705001)(99286002)(106356001)(87936001)(106116001)(40100003)(122556002)(101416001)(76576001)(5004730100002)(2501003)(76176999)(16236675004)(86612001)(50986999)(33656002)(97736004)(5003600100002)(81156007)(5007970100001)(5001770100001)(107886002)(189998001)(10400500002)(5005710100001)(10090500001)(10290500002)(5001960100002)(5002640100001)(2900100001)(2950100001)(5008740100001)(102836002)(54356999)(77096005)(8990500004)(15975445007); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR03MB1373; H:CY1PR03MB1374.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:23
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_CY1PR03MB137482B10A7FC5A830A62FAE872C0CY1PR03MB1374namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2015 16:12:04.6960 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1373
Received-SPF: pass client-ip=65.55.169.118; envelope-from=Michael.Bishop@microsoft.com; helo=na01-bl2-obe.outbound.protection.outlook.com
X-W3C-Hub-Spam-Status: No, score=-1.5
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_NW=0.5
X-W3C-Scan-Sig: maggie.w3.org 1ZtHij-00063R-CQ b5d6ba961494f95ca7e9a4d660ff211f
X-Original-To: ietf-http-wg@w3.org
Subject: RE: can h2 extension frames carry data?
Archived-At: <http://www.w3.org/mid/CY1PR03MB137482B10A7FC5A830A62FAE872C0@CY1PR03MB1374.namprd03.prod.outlook.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30418
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

The answer to your first question is clearly yes – provided the peers agree that a new alternative to the DATA frame exists before it actually goes on the wire, it’s perfectly valid.

Your latter question is a little more nuanced – what happens if two peers have different ideas of what a setting or frame type means?  Fundamentally, that’s why we have a registry of settings and frame types, of course, but there’s not a good way to determine that someone else has a bug there.

Other protocols have dealt with this by having a “mandatory to understand” bit on extensions, but that drags in other interop problems, and it still doesn’t help you in the case of a peer that thinks they understand, but are wrong.  I don’t see a good way to catch such an error, nor even a simple way we could have changed the protocol to make it detectable.  If a peer promises to support a feature but doesn’t, that’s a pretty fundamental brokenness.

Ultimately, I think we just trust in the uniqueness of values on the registry.  If someone seriously screws it up, they’ll find that they don’t have payload matching the Content-Length header they’ve received, and hopefully alarm at that point.  Not true of every request, but if you consistently have this bug, you should hit it quickly enough.

Is there value in a DROPPED_UNKNOWN_FRAME frame?

From: phluid61@gmail.com [mailto:phluid61@gmail.com] On Behalf Of Matthew Kerwin
Sent: Monday, November 2, 2015 8:47 PM
To: ietf-http-wg@w3.org
Subject: can h2 extension frames carry data?

Hi folks, I have a simple question: can HTTP/2 extension frames be used to send data?

In draft-kerwin-http2-encoded-data I've defined the GZIPPED_DATA frame, which is just like DATA but gzipped. It's protected by a setting which defaults to 0, and you MUST NOT send a GZIPPED_DATA frame unless the peer's setting is 1.

The problem I'm facing is, what happens if a buggy peer sends the frame at the wrong time (or, potentially worse, if a buggy peer sends the setting incorrectly?) Because "implementations MUST discard frames that have unknown or unsupported types," we can end up silently losing data, with no way to detect it, let alone throw an error or recover.

In HTTP/2 we've been pretty good at backing up most MUST NOTs with detectable errors, and I don't feel comfortable introducing something where the "or else" is "the page you requested/sent evaporates silently."

Is this a deficiency of HTTP/2's extensibility model? Or am I missing a simple way to make it work?

Cheers
--
  Matthew Kerwin
  http://matthew.kerwin.net.au/