Re: [hybi] Fwd: New Version Notification for draft-mcmanus-httpbis-h2-websockets-01.txt

Andy Green <andy@warmcat.com> Fri, 10 November 2017 06:51 UTC

Return-Path: <andy@warmcat.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 391DA12762F for <hybi@ietfa.amsl.com>; Thu, 9 Nov 2017 22:51:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 AIcIZE-A8c26 for <hybi@ietfa.amsl.com>; Thu, 9 Nov 2017 22:51:22 -0800 (PST)
Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9DDF51242EA for <hybi@ietf.org>; Thu, 9 Nov 2017 22:51:22 -0800 (PST)
To: Kari Hurtta <hurtta-ietf@elmme-mailer.org>, Wenbo Zhu <wenboz@google.com>, Kazuho Oku <kazuhooku@gmail.com>
Cc: Patrick McManus <pmcmanus@mozilla.com>, hybi <hybi@ietf.org>, HTTP Working Group <ietf-http-wg@w3.org>
References: <CAD3-0rPPGx4k+ksk-QDnNhnescfPHiYSJ-z2AQeMR2=khaO_HQ@mail.gmail.com> <20171110061456.1349EB532F@welho-filter2.welho.com>
From: Andy Green <andy@warmcat.com>
Message-ID: <539a34dd-5d56-15a6-df81-50a48b4c18f7@warmcat.com>
Date: Fri, 10 Nov 2017 14:50:32 +0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
In-Reply-To: <20171110061456.1349EB532F@welho-filter2.welho.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/hybi/Y3aytCaA5Pk7lI0gCjMUmimDEAY>
Subject: Re: [hybi] Fwd: New Version Notification for draft-mcmanus-httpbis-h2-websockets-01.txt
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/hybi/>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Nov 2017 06:51:24 -0000


On 11/10/2017 02:14 PM, Kari Hurtta wrote:
>> Therefore the explicit tunneling mechanism is
>> necessary to signal to proxies/frameworks that a full-duplex byte-stream is
>> being tunneled as a http/2 stream.
> 
>>> Request:
>>>    :method: GET
>>>    :scheme: https
>>>    :authority: server.example.com
>>>    :path: /chat
>>>    :upgrade: websocket
> 
> 8.1.2.1.  Pseudo-Header Fields
> https://tools.ietf.org/html/rfc7540#section-8.1.2.1
> 
> states
> 
> --------
> 
>     Pseudo-header fields are only valid in the context in which they are
>     defined.  Pseudo-header fields defined for requests MUST NOT appear
>     in responses; pseudo-header fields defined for responses MUST NOT
>     appear in requests.  Pseudo-header fields MUST NOT appear in
>     trailers.  Endpoints MUST treat a request or response that contains
>     undefined or invalid pseudo-header fields as malformed
>     (Section 8.1.2.6).
> 
> --------
> 
> Then that ":upgrade" works as explicit tunneling mechanism, IF you can trust
> that response is treated as mailformed (stream error of type PROTOCOL_ERROR)
> when proxies/frameworks does not subscribe that tunneling mechanism.
> 
> Can you trust that?

How about putting a gratuitous

content-length: 0

in one side's headers or both?  If somebody doesn't really understand 
what the endpoints are up to and continues along normal h2 lines, they 
should fail the stream on the first DATA turning up then.

-Andy

> / Kari Hurtta
> 
>