Re: Clarification on HTTP/QUIC Unidirectional Streams

Samuel Hurst <samuelh@rd.bbc.co.uk> Thu, 18 October 2018 08:46 UTC

Return-Path: <samuelh@rd.bbc.co.uk>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 225891292F1 for <quic@ietfa.amsl.com>; Thu, 18 Oct 2018 01:46:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.201
X-Spam-Level:
X-Spam-Status: No, score=-4.201 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 h5eymkZ9QMyL for <quic@ietfa.amsl.com>; Thu, 18 Oct 2018 01:46:18 -0700 (PDT)
Received: from gateh.kw.bbc.co.uk (gateh.kw.bbc.co.uk [132.185.132.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A57C3128CF3 for <quic@ietf.org>; Thu, 18 Oct 2018 01:46:18 -0700 (PDT)
Received: from mailhub1.rd.bbc.co.uk ([172.29.120.129]) by gateh.kw.bbc.co.uk (8.14.5+Sun/8.13.6) with ESMTP id w9I8kGZ4003649 for <quic@ietf.org>; Thu, 18 Oct 2018 09:46:16 +0100 (BST)
Received: from rd015072.rd.bbc.co.uk ([172.29.91.136]:54102) by mailhub1.rd.bbc.co.uk with esmtp (Exim 4.84_2) (envelope-from <samuelh@rd.bbc.co.uk>) id 1gD3wd-0000Lg-Uy for quic@ietf.org; Thu, 18 Oct 2018 09:46:16 +0100
Subject: Re: Clarification on HTTP/QUIC Unidirectional Streams
To: quic@ietf.org
References: <272107b2-8136-48cc-f429-efcea1231d78@rd.bbc.co.uk> <CAN1APddZzF-Cr77r5rvrsnwAwY_tnBRhkzviC=190sDuWr1Xtw@mail.gmail.com>
From: Samuel Hurst <samuelh@rd.bbc.co.uk>
Message-ID: <1990abd4-7112-0620-061a-3f88950eb2e1@rd.bbc.co.uk>
Date: Thu, 18 Oct 2018 09:46:15 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1
MIME-Version: 1.0
In-Reply-To: <CAN1APddZzF-Cr77r5rvrsnwAwY_tnBRhkzviC=190sDuWr1Xtw@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/BEZ5pdtfXXbEDD8Mqumfw4OMWV4>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Oct 2018 08:46:20 -0000

On 17/10/2018 18:42, Mikkel Fahnøe Jørgensen wrote:
> I’m not at all into all the details of HQ/QPACK
> 
> but you cannot assume anything about stream identifiers before you see them.
> 
> If stream 2 is an obvious control streams, some implementation will make 
> stream 8 the initial control stream because it will have some idea idea 
> about forcing the earlier streams open so the peer can do something evil 
> to them before it even begins sending data. Or they might just do it for 
> the heck of it to break applications making such assumptions (like ping 
> of death).

Oh absolutely, but I was more thinking of an example flow with a client 
behaving in an at least somewhat predictable and not malicious manner. 
I'm mostly trying to sort out in my head how the QPACK encoder/decoder 
streams work together, apologies if that wasn't as clear as it could've 
been.

I'm fully aware that a client could open as many unidirectional streams 
as it likes and as long as it doesn't do anything else on those streams 
before starting a control stream somewhere.

And if something opens a control stream on Stream 8, shouldn't that be a 
protocol error, as stream 8 is not a unidirectional stream?

> Some implementation could have fewer streams because they are 
> micro-controllers that do not want to use QPACK compression at all, so 
> assuming server push on stream 15 would possibly work most of the time 
> at best.

There's nothing in the specs that specifies when the QPACK 
encoder/decoder streams are opened, so I was going on the assumption 
that they are only opened when a client wants to use the dynamic table. 
If a client only wants to send literal headers or reference in the 
static table, or if the table size is set to zero in the SETTINGS frame, 
I'd assume the QPACK streams will not be opened. In which case, the 
first server push could be stream 7.

-Sam