Re: Stream State and PRIORITY Frames

Cory Benfield <cory@lukasa.co.uk> Thu, 19 January 2017 17:40 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 (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C326B129458 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 19 Jan 2017 09:40:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.619
X-Spam-Level:
X-Spam-Status: No, score=-9.619 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-3.199, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lukasa-co-uk.20150623.gappssmtp.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 8aq2GR7N_gR5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 19 Jan 2017 09:40:32 -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 317EF1293F9 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 19 Jan 2017 09:40:32 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1cUGeD-0006Go-R9 for ietf-http-wg-dist@listhub.w3.org; Thu, 19 Jan 2017 17:37:17 +0000
Resent-Date: Thu, 19 Jan 2017 17:37:17 +0000
Resent-Message-Id: <E1cUGeD-0006Go-R9@frink.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <cory@lukasa.co.uk>) id 1cUGeA-0005zc-1T for ietf-http-wg@listhub.w3.org; Thu, 19 Jan 2017 17:37:14 +0000
Received: from mail-wm0-f50.google.com ([74.125.82.50]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <cory@lukasa.co.uk>) id 1cUGe3-00024f-SC for ietf-http-wg@w3.org; Thu, 19 Jan 2017 17:37:08 +0000
Received: by mail-wm0-f50.google.com with SMTP id r126so3655276wmr.0 for <ietf-http-wg@w3.org>; Thu, 19 Jan 2017 09:36:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lukasa-co-uk.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=x99K6BEmCBZw3qVQ0q5krRBx/Zg5aYA1ibYovnHF4Ik=; b=mD8pXvzWpRnuMWdW4ST85QFpgWg06unkzy/VoPUGNBxUcFQPP96SD64ky3L8BW1ARk yUWYGQsXIKwXYADAYRQCaq6u0+D0AuaZZQ0oOx6LORSdlgr8s0zOjR+kJQgMgiIVFB4U ykzucp8sKbxqZK6oIjoI27hi8uG1FRmXk9QNZAWYyI6L3pLEIglMZB0YIuwjtcSeEFuY GS2KCqGGS4PoNdE+SPa/aatzoEhWFulucPRNVIdshCYSNWTl7jRR8v7qV+zO3xO+1AJQ KLu6MEir3oI1ai/nunsXcqWh8XLXxE3TgtfgMhsjbt7e/ju8KmG7vXC1Kzsus/4B98EJ R8Ng==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=x99K6BEmCBZw3qVQ0q5krRBx/Zg5aYA1ibYovnHF4Ik=; b=im+ZH9XkvZRDQYCnnEAv4FKvAKDDA+FTBtJTG0duQrxH5h7QleQulV8cKVXIkO/xZh n8wjWk0UbHq8lBiQgfk1x9m9F/t5D5NKj330He82wUkhXnY9Cj/hJdcCZxLzyfubCCo2 WjaxEKTB+wqCkghGNGTSxKK5CHwvrndwbdS9QC+H6sm+94xOG/RjHFHGTTAMxxkYJso6 a26en0ultbJZtDCWX8+VqF9/JYKPcrV+Nid2asg6hlmtVI1yxnuVa7Wl31mTvhJRZgND ZxoWOQJDL4aReGa+FMWsLxdVerP1SbwhpudZEBbOdqjHhTp2Y0+VTDFfrlSEnEvz3Pkh 6v9A==
X-Gm-Message-State: AIkVDXJ6l4BTr1EtPMpeZwWI3bLlaGWXKiENHG3s2DZVE4ByvDhwJEzpBFZ4gs9DPqGX7g==
X-Received: by 10.28.153.10 with SMTP id b10mr24533365wme.103.1484847400944; Thu, 19 Jan 2017 09:36:40 -0800 (PST)
Received: from [192.168.1.3] (197.71.125.91.dyn.plus.net. [91.125.71.197]) by smtp.gmail.com with ESMTPSA id 63sm54670134wmg.2.2017.01.19.09.36.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2017 09:36:40 -0800 (PST)
From: Cory Benfield <cory@lukasa.co.uk>
Message-Id: <7A0ABB7C-5004-422B-B01C-222FFF2C3A94@lukasa.co.uk>
Content-Type: multipart/alternative; boundary="Apple-Mail=_C9482204-4B46-4AB5-BFB9-754A6F681C79"
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
Date: Thu, 19 Jan 2017 17:36:38 +0000
In-Reply-To: <CAOdDvNq9RScN6-mP5o9hLgDTzMGhDL6pQ-vAMo8ZD6WK2Rf50w@mail.gmail.com>
Cc: Benedikt Christoph Wolters <benedikt.wolters@rwth-aachen.de>, Scott Mitchell <scott.k.mitch1@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
To: Patrick McManus <pmcmanus@mozilla.com>
References: <CAFn2buAYWHQSWhhoKZ2GKbqXR1A+tScjkAwZmOuQ9gV9jMp2bA@mail.gmail.com> <CAGZNdJWe0Y=M_SWmgYabKbWZwPEuJdw67Km8+UtR4oUtZuXA5A@mail.gmail.com> <2BC01E49-91A1-43A7-AFD0-5A34F2689428@lukasa.co.uk> <CAOdDvNq9RScN6-mP5o9hLgDTzMGhDL6pQ-vAMo8ZD6WK2Rf50w@mail.gmail.com>
X-Mailer: Apple Mail (2.3259)
Received-SPF: pass client-ip=74.125.82.50; envelope-from=cory@lukasa.co.uk; helo=mail-wm0-f50.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-0.126, 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1cUGe3-00024f-SC df134dd8e47e91c2f949d79bc0433bc7
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Stream State and PRIORITY Frames
Archived-At: <http://www.w3.org/mid/7A0ABB7C-5004-422B-B01C-222FFF2C3A94@lukasa.co.uk>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33331
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 19 Jan 2017, at 15:51, Patrick McManus <pmcmanus@mozilla.com> wrote:
> 
> Hey Cory, this is a bit of a back alley - but can you help me understand the scenario here. Priority is not an end to end concept - the dependencies are clearly connection based and only make sense relevant to each other. So is hyper-h2 just forwarding client Priority frames directly? How would that work? (I know its not your project.. you just seem to grok what's going on..)

Definitely a side-alley: I suspect we may want to take this off-list.

The short version is that mitmproxy is an intercepting web proxy. This means it has slightly different goals than most intermediaries do: in particular, it wants to be able to understand the content of a HTTP connection without manipulating it. It doesn’t do connection coalescing, or caching, or any of the things that would require that it actually do anything with priorities: it just logs the data and presents it in a handy-dandy debuggable form. Incidentally, it also does connection-replay and a whole host of other fun stuff.

As a result, it handles the bytestream of a HTTP/2 connection a bit weirdly. Specifically, as far as I understand it, when it receives a HTTP/2 connection it sets up a data pipe between the client and server, essentially forwarding their data onto each other. But, in addition to that, it runs a pair of HTTP/2 stacks as basically a B2BUA: it treats itself as the server for the client and it treats itself as the client for the server. This is mostly a correctness concern, helping it make semantic sense of the HTTP/2 connection. However, the HTTP/2 stack it uses (mine) tries to be fastidious about correctness, so I tend to get tagged in on bug reports when connections go awry. That included this one.

Does that clarify, or did I just make it all murkier?

Cory