Re: Re: Quick review for draft-svirid-websocket2-over-http2 (Was: Re: Draft HTTPbis Agenda For Seoul IETF 97)

Kari Hurtta <hurtta-ietf@elmme-mailer.org> Thu, 20 October 2016 09:39 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 8A11312956F for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 20 Oct 2016 02:39:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.332
X-Spam-Level:
X-Spam-Status: No, score=-7.332 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.431, SPF_HELO_PASS=-0.001, 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 TgwXmSsV0dIy for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 20 Oct 2016 02:39:15 -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 C4A7412946D for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 20 Oct 2016 02:39:15 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1bx9kC-0001MI-Ca for ietf-http-wg-dist@listhub.w3.org; Thu, 20 Oct 2016 09:34:36 +0000
Resent-Date: Thu, 20 Oct 2016 09:34:36 +0000
Resent-Message-Id: <E1bx9kC-0001MI-Ca@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 <khurtta@welho.com>) id 1bx9k7-0001LX-5k for ietf-http-wg@listhub.w3.org; Thu, 20 Oct 2016 09:34:31 +0000
Received: from welho-filter2.welho.com ([83.102.41.24]) by maggie.w3.org with esmtp (Exim 4.80) (envelope-from <khurtta@welho.com>) id 1bx9k1-0002ta-KB for ietf-http-wg@w3.org; Thu, 20 Oct 2016 09:34:29 +0000
Received: from localhost (localhost [127.0.0.1]) by welho-filter2.welho.com (Postfix) with ESMTP id AB25113BFC; Thu, 20 Oct 2016 12:33:57 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp3.welho.com ([IPv6:::ffff:83.102.41.86]) by localhost (welho-filter2.welho.com [::ffff:83.102.41.24]) (amavisd-new, port 10024) with ESMTP id vZO0QfUo6iJ5; Thu, 20 Oct 2016 12:33:56 +0300 (EEST)
Received: from hurtta09lk.keh.iki.fi (89-27-35-245.bb.dnainternet.fi [89.27.35.245]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp3.welho.com (Postfix) with ESMTPS id 3BEBD2310; Thu, 20 Oct 2016 12:33:56 +0300 (EEST)
In-Reply-To: <CANatvzx0+6P8+SifWY=4uFJUZg5mTKsjEeQgn2=w+huPEa9kyQ@mail.gmail.com>
References: <CANatvzx0+6P8+SifWY=4uFJUZg5mTKsjEeQgn2=w+huPEa9kyQ@mail.gmail.com>
To: HTTP working group mailing list <ietf-http-wg@w3.org>
Date: Thu, 20 Oct 2016 12:33:55 +0300
Sender: hurtta@hurtta09lk.keh.iki.fi
From: Kari Hurtta <hurtta-ietf@elmme-mailer.org>
CC: Kazuho Oku <kazuhooku@gmail.com>, Tom Bergan <tombergan@chromium.org>, Ilari Liusvaara <ilariliusvaara@welho.com>, Van Catha <vans554@gmail.com>
X-Mailer: ELM [version ME+ 2.5 PLalpha42+]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="UTF-8"
Message-Id: <20161020093357.AB25113BFC@welho-filter2.welho.com>
Received-SPF: none client-ip=83.102.41.24; envelope-from=khurtta@welho.com; helo=welho-filter2.welho.com
X-W3C-Hub-Spam-Status: No, score=-5.6
X-W3C-Hub-Spam-Report: AWL=-1.343, BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.316, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1bx9k1-0002ta-KB 38ed0c611f5e24c44b2ff57df01e66ae
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Re: Quick review for draft-svirid-websocket2-over-http2 (Was: Re: Draft HTTPbis Agenda For Seoul IETF 97)
Archived-At: <http://www.w3.org/mid/20161020093357.AB25113BFC@welho-filter2.welho.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32653
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>

> This could be the case for any HTTP/2 gateway that translates incoming
> requests to HTTP/1, that does not reject unknown schemes. And whether
> such gateway needs to reject schemes that do not match to the
> request-response model of HTTP seems to be vague in reading RFC 7540.
> Section 8.1.2.3 states that:
> 
>       ":scheme" is not restricted to "http" and "https" schemed URIs.  A
>       proxy or gateway can translate requests for non-HTTP schemes,
>       enabling the use of HTTP to interact with non-HTTP services.
> 
> My interpretation of this paragraph would be that it is permitted for
> an HTTP/2 intermediary to transmit requests with schemes other than
> "http" or "https", expecting that an upstream server would process the
> request according to the scheme, considering the fact that (per my
> understanding) such action is permitted in HTTP/1.1.

Yes. HTTP/2 explicitly uses HTTP/1.1 semantic. 

8.  HTTP Message Exchanges
https://tools.ietf.org/html/rfc7540#section-8

|   Thus, the specification and requirements of HTTP/1.1 Semantics and
|   Content [RFC7231], Conditional Requests [RFC7232], Range Requests
|   [RFC7233], Caching [RFC7234], and Authentication [RFC7235] are
|   applicable to HTTP/2.  Selected portions of HTTP/1.1 Message Syntax
|   and Routing [RFC7230], such as the HTTP and HTTPS URI schemes, are
|   also applicable in HTTP/2, but the expression of those semantics for
|   this protocol are defined in the sections below.

3.1.  Client Handshake Request
https://tools.ietf.org/html/draft-svirid-websocket2-over-http2-00#section-3.1

| 3.1.  Client Handshake Request
| 
|    The client MUST use the :method GET.
| 
|    The client MUST send a sec-ws2-version header that MUST specify the
|    websocket2 version being used.
| 
|    The client MAY send a sec-ws2-compression header that advertises the
|    compression methods the client supports.  Valid key value pairs
|   include:

↡

| The client MUST NOT set the END_STREAM flag when sending the headers.


Note however that this apply:

4.3.1.  GET
https://tools.ietf.org/html/rfc7231#section-4.3.1

|   A payload within a GET request message has no defined semantics;
|   sending a payload body on a GET request might cause some existing
|   implementations to reject the request.
|
|   The response to a GET request is cacheable; a cache MAY use it to
|   satisfy subsequent GET and HEAD requests unless otherwise indicated
|   by the Cache-Control header field (Section 5.2 of [RFC7234]).


Changing of scheme does not change semantic of methods.

2.  Resources
https://tools.ietf.org/html/rfc7231#section-2

|   One design goal of HTTP is to separate resource identification from
|   request semantics, which is made possible by vesting the request
|   semantics in the request method (Section 4) and a few
|   request-modifying header fields (Section 5).  If there is a conflict
|   between the method semantics and any semantic implied by the URI
|   itself, as described in Section 4.2.1, the method semantics take
|   precedence.

( scheme is part of URI )

2.7.  Uniform Resource Identifiers
https://tools.ietf.org/html/rfc7230#section-2.7

|   Uniform Resource Identifiers (URIs) [RFC3986] are used throughout
|   HTTP as the means for identifying resources (Section 2 of [RFC7231]).
|   URI references are used to target requests, indicate redirects, and
|   define relationships.


/ Kari Hurtta