Re: Invalid HTTP2 preface handling?

"Poul-Henning Kamp" <phk@phk.freebsd.dk> Wed, 11 February 2015 08:05 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ietf.org@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 DB0511A8549 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 11 Feb 2015 00:05:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.013
X-Spam-Level:
X-Spam-Status: No, score=-5.013 tagged_above=-999 required=5 tests=[BAYES_20=-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 sW9otjkhhyWn for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 11 Feb 2015 00:05:26 -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 6610D1A802D for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 11 Feb 2015 00:05:26 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1YLSFf-00043D-Og for ietf-http-wg-dist@listhub.w3.org; Wed, 11 Feb 2015 08:02:27 +0000
Resent-Date: Wed, 11 Feb 2015 08:02:27 +0000
Resent-Message-Id: <E1YLSFf-00043D-Og@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.80) (envelope-from <phk@phk.freebsd.dk>) id 1YLSFZ-00042R-9K for ietf-http-wg@listhub.w3.org; Wed, 11 Feb 2015 08:02:21 +0000
Received: from phk.freebsd.dk ([130.225.244.222]) by maggie.w3.org with esmtp (Exim 4.72) (envelope-from <phk@phk.freebsd.dk>) id 1YLSFY-0001bA-D8 for ietf-http-wg@w3.org; Wed, 11 Feb 2015 08:02:21 +0000
Received: from critter.freebsd.dk (unknown [192.168.60.3]) by phk.freebsd.dk (Postfix) with ESMTP id 099ED3B8A2; Wed, 11 Feb 2015 08:01:57 +0000 (UTC)
Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.9/8.14.9) with ESMTP id t1B81tvM019908; Wed, 11 Feb 2015 08:01:56 GMT (envelope-from phk@phk.freebsd.dk)
To: Greg Wilkins <gregw@intalio.com>
cc: HTTP Working Group <ietf-http-wg@w3.org>
In-reply-to: <CAH_y2NE5Sa625XEec5WXJ7LdjK+h1b4M=Fc-_iGj2ZQKa1q_jg@mail.gmail.com>
From: Poul-Henning Kamp <phk@phk.freebsd.dk>
References: <CAH_y2NE5Sa625XEec5WXJ7LdjK+h1b4M=Fc-_iGj2ZQKa1q_jg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <19906.1423641715.1@critter.freebsd.dk>
Content-Transfer-Encoding: quoted-printable
Date: Wed, 11 Feb 2015 08:01:55 +0000
Message-ID: <19907.1423641715@critter.freebsd.dk>
Received-SPF: none client-ip=130.225.244.222; envelope-from=phk@phk.freebsd.dk; helo=phk.freebsd.dk
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-2.459, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01
X-W3C-Scan-Sig: maggie.w3.org 1YLSFY-0001bA-D8 12f05d732b76cb344fe9aff233854a28
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Invalid HTTP2 preface handling?
Archived-At: <http://www.w3.org/mid/19907.1423641715@critter.freebsd.dk>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/28816
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>

--------
In message <CAH_y2NE5Sa625XEec5WXJ7LdjK+h1b4M=Fc-_iGj2ZQKa1q_jg@mail.gmail.com>
, Greg Wilkins writes:

>I'm wondering what would be the problem if on an invalid preface, the
>server check if it is actually a valid HTTP/1 request and if so, then to
>proceed on that basis?

If by "proceed" you mean "Send back a HTTP/1 response that will
help people at the far end diagnose the problem and then close",
you'll be fine.  Anything more ambitious is on shaky ground.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.