[hybi] draft-mcmanus-httpbis-h2-websockets

Kari Hurtta <hurtta-ietf@elmme-mailer.org> Tue, 17 October 2017 18:33 UTC

Return-Path: <khurtta@welho.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 A68D7133080 for <hybi@ietfa.amsl.com>; Tue, 17 Oct 2017 11:33:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.499
X-Spam-Level:
X-Spam-Status: No, score=-0.499 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, HEADER_FROM_DIFFERENT_DOMAINS=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 7cB8ELsgE8F4 for <hybi@ietfa.amsl.com>; Tue, 17 Oct 2017 11:33:33 -0700 (PDT)
Received: from welho-filter3.welho.com (welho-filter3.welho.com [83.102.41.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BD739133070 for <hybi@ietf.org>; Tue, 17 Oct 2017 11:33:32 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter3.welho.com (Postfix) with ESMTP id 7ACBD4DC6B; Tue, 17 Oct 2017 21:33:29 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp1.welho.com ([IPv6:::ffff:83.102.41.84]) by localhost (welho-filter3.welho.com [::ffff:83.102.41.25]) (amavisd-new, port 10024) with ESMTP id twughm8oBG8T; Tue, 17 Oct 2017 21:33:27 +0300 (EEST)
Received: from hurtta09lk.keh.iki.fi (89-27-39-95.bb.dnainternet.fi [89.27.39.95]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp1.welho.com (Postfix) with ESMTPS id D758FC4; Tue, 17 Oct 2017 21:33:21 +0300 (EEST)
To: Patrick McManus <mcmanus@ducksong.com>, HTTP Working Group <ietf-http-wg@w3.org>
Date: Tue, 17 Oct 2017 21:33:20 +0300 (EEST)
Sender: hurtta@hurtta09lk.keh.iki.fi
From: Kari Hurtta <hurtta-ietf@elmme-mailer.org>
CC: Kari Hurtta <hurtta-ietf@elmme-mailer.org>, hybi <hybi@ietf.org>
X-Mailer: ELM [version ME+ 2.5 PLalpha46+]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <20171017183329.7ACBD4DC6B@welho-filter3.welho.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/hybi/dxYpJ0enBtG6d2dvKcDeQphUsbk>
Subject: [hybi] draft-mcmanus-httpbis-h2-websockets
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: Tue, 17 Oct 2017 18:33:35 -0000

https://tools.ietf.org/html/draft-mcmanus-httpbis-h2-websockets-00#section-4.2

" [[ From Client ]]                        [[ From Server ]]
"
"                                           SETTINGS
"                                           ENABLE_CONNECT_PROTOCOL = 1
"
"  HEADERS + END_HEADERS
"  :method = CONNECT
"  :protocol = websocket
"  :scheme = wss
"  :path = /chat
"  :authority = server.example.com:443
"
"                                           HEADERS + END_HEADERS
"                                           :status = 200
"
"  DATA
"  GET /chat HTTP/1.1
"  Host: server.example.com
"  Upgrade: websocket
"  Connection: Upgrade
"  Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
"  Origin: http://example.com
"  Sec-WebSocket-Protocol: chat, superchat
"  Sec-WebSocket-Version: 13
"
"                                           DATA
"                                           HTTP/1.1 101 Plead The Fifth
"                                           Upgrade: websocket
"                                           Connection: Upgrade
"                                           Sec-WebSocket-Accept:
"                                            s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
"                                           Sec-WebSocket-Protocol: chat
"
"  DATA
"  WebSocket Data
"
"                                           DATA + END_STREAM
"                                           WebSocket Data
"
"  DATA + END_STREAM
"  WebSocket Data

I'm wondering

1) why this is is not

"                                           SETTINGS
"                                           ENABLE_CONNECT_PROTOCOL = 1
"
"  HEADERS + END_HEADERS
"  :method = CONNECT
"  :protocol = websocket
"  :scheme = wss
"  :path = /chat
"  :authority = server.example.com:443
"  sec-webSocket-key = dGhlIHNhbXBsZSBub25jZQ==
"  origin = http://example.com
"  sec-websocket-protocol = chat, superchat
"  sec-websocket-version = 13
"
"                                           HEADERS + END_HEADERS
"                                           :status = 200
"                                           sec-websocket-accept = s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
"                                           sec-websocket-protocol = chat
"
" DATA
" WebSocket Data
"
"
"                                           DATA + END_STREAM
"                                           WebSocket Data

2)

What happens if this is

" [[ From Client ]]                        [[ From Server ]]
"
"                                           SETTINGS
"                                           ENABLE_CONNECT_PROTOCOL = 1
"
"  HEADERS + END_HEADERS
"  :method = CONNECT
"  :protocol = websocket
"  :scheme = wss
"  :path = /chat
"  :authority = server.example.com:443
"
"                                           HEADERS + END_HEADERS
"                                           :status = 200
"

"  DATA
"  GET /admin HTTP/1.1
"  Host: server.example.org
"  Upgrade: websocket
"  Connection: Upgrade
"  Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
"  Origin: http://example.org
"  Sec-WebSocket-Protocol: chat, superchat
"  Sec-WebSocket-Version: 13

That is: "outer" (h2) and "inner" (websocket) handshake gives different data.

/ Kari Hurtta