Re: Extensions and error codes

Adrian Cole <adrian.f.cole@gmail.com> Wed, 15 October 2014 07:02 UTC

Return-Path: <ietf-http-wg-request@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 2BF901A0397 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 15 Oct 2014 00:02:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.012
X-Spam-Level:
X-Spam-Status: No, score=-7.012 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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 uoZhBczcQ7wW for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 15 Oct 2014 00:02:16 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 189DC1A039A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 15 Oct 2014 00:02:15 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1XeIXx-0007f7-FP for ietf-http-wg-dist@listhub.w3.org; Wed, 15 Oct 2014 06:58:57 +0000
Resent-Date: Wed, 15 Oct 2014 06:58:57 +0000
Resent-Message-Id: <E1XeIXx-0007f7-FP@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <adrian.f.cole@gmail.com>) id 1XeIXt-0007eN-OB for ietf-http-wg@listhub.w3.org; Wed, 15 Oct 2014 06:58:53 +0000
Received: from mail-ob0-f176.google.com ([209.85.214.176]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <adrian.f.cole@gmail.com>) id 1XeIXs-0004Zs-No for ietf-http-wg@w3.org; Wed, 15 Oct 2014 06:58:53 +0000
Received: by mail-ob0-f176.google.com with SMTP id m8so520309obr.21 for <ietf-http-wg@w3.org>; Tue, 14 Oct 2014 23:58:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=c2kH7RB/L+bED8IUAaw3FNKaTtJZzTyhJUW3pBqn+2E=; b=f6+KANzpjgwZOwQi3hzugUiREnXVEq2005hvSk0aV8Mz9GYf09xayrGmfWh77KqqwA jZJgPECI7NCWpP1nEcgkygMcfjyATSqNK7RxNA+79YMHe4XCFsKwf+cOEzNfrTNFL2Hh mwKx1qSUtGXsOYkpDtX23M43HWUErKVqIHdYJsbF22D94JzVWNfMuD3tuXX1Ca1Wov22 ihzwDzQcF8rvqKSa/LLAEYXfMoeDndKEEVFIWUA6iLE+oG24+TuILB/INwT6fwKCqWpy V4ZXXHzgYHhuseikg0drnvlJP3vXJpemXjVF1HT1MIQ/Wb5kbAYZsmLixp/RCQr93H9J /7dQ==
MIME-Version: 1.0
X-Received: by 10.60.132.7 with SMTP id oq7mr84222oeb.61.1413356306531; Tue, 14 Oct 2014 23:58:26 -0700 (PDT)
Received: by 10.202.17.132 with HTTP; Tue, 14 Oct 2014 23:58:26 -0700 (PDT)
In-Reply-To: <CAHzwyDvuD_5tq+ycFwSyoiKyQ_C92Pixc-7kCKhU8iOU79p3Dw@mail.gmail.com>
References: <CAHzwyDvuD_5tq+ycFwSyoiKyQ_C92Pixc-7kCKhU8iOU79p3Dw@mail.gmail.com>
Date: Tue, 14 Oct 2014 23:58:26 -0700
Message-ID: <CAHzwyDt5EJwDyjgLk2wbOp424wAmNr=48eV6gDmv2d5eGpEM=Q@mail.gmail.com>
From: Adrian Cole <adrian.f.cole@gmail.com>
To: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.214.176; envelope-from=adrian.f.cole@gmail.com; helo=mail-ob0-f176.google.com
X-W3C-Hub-Spam-Status: No, score=-4.2
X-W3C-Hub-Spam-Report: AWL=-1.487, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1XeIXs-0004Zs-No 23bdd886eac01290a24cdea80f0d4d3e
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Extensions and error codes
Archived-At: <http://www.w3.org/mid/CAHzwyDt5EJwDyjgLk2wbOp424wAmNr=48eV6gDmv2d5eGpEM=Q@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/27619
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>

I suppose this wording indirectly covers it.

"extensions that could change the semantics of existing protocol components MUST
be negotiated before being used..." [1]

By virtue of overriding how existing frames are used, it could decide
to return errors as http responses as opposed to doing that in the
framing layer as goaway, reset, etc.

It is an interesting problem to solve, portably allowing extensions
who have a lot of leeway. Might be another column for the
Implementations Wiki: "extension support" Always nice to see how
others handle these things.

-A

[1] https://github.com/http2/http2-spec/blob/master/draft-ietf-httpbis-http2.xml#L1540

On Tue, Oct 14, 2014 at 11:01 PM, Adrian Cole <adrian.f.cole@gmail.com> wrote:
> I had a look at a websocket over http/2 draft yesterday. I noticed it
> saying we should return an http 501 upon some setting thing not
> working out.
>
> https://github.com/yutakahirano/ws-over-http2/blob/master/draft-hirano-websocket-over-http2.txt#L235
>
> This made me scratch my head, as I implement http/2 framing, settings,
> etc than the layer than handles http semantics (eg what a 501 means).
> IOTW, I would have expected an extension to enumerate an error I'd
> send on goaway, not an http response code.
>
> As an implementor, I would handle code very differently if something
> in SETTINGS means I should return a specific HEADERS frame back.
>
> Looking at the spec, it doesn't specify on what types of actions we
> might take on a SETTING being unsupported. Should we be?
> https://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-5.5
>
> Apologies, if I missed a thread that discussed this.
> -A