Re: X-Forwarded-For and HTTP2

Willy Tarreau <w@1wt.eu> Thu, 09 July 2015 09:06 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 791861ACEA6 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 9 Jul 2015 02:06:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.912
X-Spam-Level:
X-Spam-Status: No, score=-6.912 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 MKco-7UKLIvA for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 9 Jul 2015 02:06:07 -0700 (PDT)
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 45C021ACEA1 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 9 Jul 2015 02:06:07 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ZD7ji-0006Tk-S4 for ietf-http-wg-dist@listhub.w3.org; Thu, 09 Jul 2015 09:03:18 +0000
Resent-Date: Thu, 09 Jul 2015 09:03:18 +0000
Resent-Message-Id: <E1ZD7ji-0006Tk-S4@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 <w@1wt.eu>) id 1ZD7jg-0006T0-1i for ietf-http-wg@listhub.w3.org; Thu, 09 Jul 2015 09:03:16 +0000
Received: from wtarreau.pck.nerim.net ([62.212.114.60] helo=1wt.eu) by maggie.w3.org with esmtp (Exim 4.80) (envelope-from <w@1wt.eu>) id 1ZD7jc-00026Y-U5 for ietf-http-wg@w3.org; Thu, 09 Jul 2015 09:03:15 +0000
Received: (from willy@localhost) by pcw.home.local (8.14.3/8.14.3/Submit) id t6992jZ2026429; Thu, 9 Jul 2015 11:02:45 +0200
Date: Thu, 09 Jul 2015 11:02:45 +0200
From: Willy Tarreau <w@1wt.eu>
To: Fedor Indutny <fedor@indutny.com>
Cc: Mark Nottingham <mnot@mnot.net>, Mike Bishop <Michael.Bishop@microsoft.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-ID: <20150709090245.GD26380@1wt.eu>
References: <CAEv2VfJyOnQ9Ft7t92GSH6HTVuEYOoz_6R_axuUHF3TrViP-mw@mail.gmail.com> <91741EAC-73D9-4D58-AD02-71F992BDB056@mnot.net> <BL2PR03MB1323543F9C11583FE2F84DA87910@BL2PR03MB132.namprd03.prod.outlook.com> <E73D610F-E047-49D6-B57C-4661C8BAC3AC@mnot.net> <20150709082711.GA26371@1wt.eu> <CAEv2VfKNwdTPg0xSDk-Yor6Tn6hvnOadJ_vJPhQch6JOpwXv2w@mail.gmail.com> <20150709084720.GB26380@1wt.eu> <CAEv2VfL4uy7XZ+cnLHUrB5ga1yXZZ8eKzuGm_vqa_mfy586aQA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CAEv2VfL4uy7XZ+cnLHUrB5ga1yXZZ8eKzuGm_vqa_mfy586aQA@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Received-SPF: pass client-ip=62.212.114.60; envelope-from=w@1wt.eu; helo=1wt.eu
X-W3C-Hub-Spam-Status: No, score=-7.0
X-W3C-Hub-Spam-Report: AWL=0.923, BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1ZD7jc-00026Y-U5 46aed8045781449afcbe6515dce9b5db
X-Original-To: ietf-http-wg@w3.org
Subject: Re: X-Forwarded-For and HTTP2
Archived-At: <http://www.w3.org/mid/20150709090245.GD26380@1wt.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/29895
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>

On Thu, Jul 09, 2015 at 01:54:59AM -0700, Fedor Indutny wrote:
> Aaah, sorry for this then. I got you wrong.

No problem.

> I see your logic about the protocol header, but it does add
> unnecessary complexity to the backend side. From my
> experience, this usually means stripping down default HTTP(2)
> parser and working with the TCP socket at first, and only after
> the parsing the protocol header execute the default HTTP code.

Normally it's done just after the accept() so that it doesn't
interfere with the parsing. For example I have no idea how to
parse SSL, yet I can parse the protocol before SSL does its job.

> This statement implies that backends usually run on some kind
> of existing platform like node.js, or anything else. And those
> platforms have protocol implementations, so why not use just it
> instead of adding PROXYLINE parsing code to them?

I see your point but then I'd propose different semantics : instead
of fiddling with HTTP/2 frames, maybe you'd want to propose something
similar to what the proxy protocol header does, but as a TLS extension
so that it continues to repeat the information it got on the other side
of the connection. Note I'm really meaning a connection here. I really
find it wrong to say something like "all these frames belong to the
same connection", I'd rather say "the connection I'm sending to you
has such properties", because I have no idea what the frames transported
inside look like nor if someone upstream has put another semantics on
their relation.

Willy