Re: [hybi] I-D Action: draft-ietf-hybi-permessage-compression-09.txt

Tobias Oberstein <tobias.oberstein@tavendo.de> Tue, 04 June 2013 13:53 UTC

Return-Path: <tobias.oberstein@tavendo.de>
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 114DD21F9997 for <hybi@ietfa.amsl.com>; Tue, 4 Jun 2013 06:53:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.449
X-Spam-Level:
X-Spam-Status: No, score=-2.449 tagged_above=-999 required=5 tests=[AWL=0.150, BAYES_00=-2.599]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FZV-Zrch5t7p for <hybi@ietfa.amsl.com>; Tue, 4 Jun 2013 06:53:13 -0700 (PDT)
Received: from EXHUB020-4.exch020.serverdata.net (exhub020-4.exch020.serverdata.net [206.225.164.31]) by ietfa.amsl.com (Postfix) with ESMTP id 9338D21F9AA2 for <hybi@ietf.org>; Tue, 4 Jun 2013 05:20:56 -0700 (PDT)
Received: from EXVMBX020-12.exch020.serverdata.net ([169.254.3.90]) by EXHUB020-4.exch020.serverdata.net ([206.225.164.31]) with mapi; Tue, 4 Jun 2013 05:20:54 -0700
From: Tobias Oberstein <tobias.oberstein@tavendo.de>
To: Takeshi Yoshino <tyoshino@google.com>
Date: Tue, 04 Jun 2013 05:20:48 -0700
Thread-Topic: [hybi] I-D Action: draft-ietf-hybi-permessage-compression-09.txt
Thread-Index: Ac5hFS2qc5FLRswvRW6q9R2YxqaBlQABaBbg
Message-ID: <634914A010D0B943A035D226786325D4422DC213DF@EXVMBX020-12.exch020.serverdata.net>
References: <20130425140626.10027.9016.idtracker@ietfa.amsl.com> <CAH9hSJYDH47Ya1FNp80xjeD=pwYJAqcx=XDr=SnBbNDD+f-r4Q@mail.gmail.com> <CAH9hSJYa8QA9VkOwS6GEr0+8iJcnQcpMy3X_fKwGQOuJRr=sEw@mail.gmail.com> <634914A010D0B943A035D226786325D4422DC20D62@EXVMBX020-12.exch020.serverdata.net> <CAH9hSJbbFYL3TTo3YH2stF78qnxDd1EQe8HYOiV9rz3b+6fpvw@mail.gmail.com>
In-Reply-To: <CAH9hSJbbFYL3TTo3YH2stF78qnxDd1EQe8HYOiV9rz3b+6fpvw@mail.gmail.com>
Accept-Language: de-DE, en-US
Content-Language: de-DE
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: de-DE, en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] I-D Action: draft-ietf-hybi-permessage-compression-09.txt
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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, 04 Jun 2013 13:53:28 -0000

>     http://code.google.com/p/chromium/issues/detail?id=245732
>     http://code.google.com/p/chromium/issues/detail?id=245719
> 
> 
> Thanks so much.

Thanks for awesome speed with fixing the first!

> 
>     2)
>     If client offers multiple PMCE choices to the server by including
>     multiple elements in the "Sec-WebSocket-Extensions" header and the
>     server supports more than one of the PMCEs offered, is there any
>     preference which PMCE the server SHOULD choose? E.g. the first PMCE
>     in the header that is supported by the server?
> 
>     The description of the examples in "5.1. Negotiation Examples" seem
>     to suggest that the _ordering_ of alternative PMCE offered
>     designates _preference_.
> 
> 
> Yes. Order means preference. The server may choose any even if it 
> supports all of them.
> 
> Do you think we need any text to make it clear?

I think it would clarify things by adding text like

"""
A server MAY choose any PMCE offered by the client and supported by the server.
The order of PMCE offered by the client designates preference by the client and a server SHOULD accept the first offer in the list (by order) that it supports.
"""

This IMHO makes sense and brings the abstract description in line with the text in "5.1. Negotiation Examples".

> 
>     3)
>     """
>         A server MUST decline a "permessage-deflate" offer if any of the
>         following conditions is met:
> 
>         o  The offer has any extension parameter not defined for use in an
>            offer.
> 
>         o  The offer has any extension parameter with an invalid value.
> 
>         o  The offer has multiple extension parameters with the same name.
> 
>         o  The server doesn't support the offered configuration.
>     """
> 
>     So if multiple permessage-deflate PMCEs are offered by the client,
>     the server silently skips any invalid until the first valid or none
>     if there is no single valid one?
> 
>     The server does NOT fail the WS connection upon encountering the
>     first invalid PMCE in the list of offers?
> 
> 
> Yes. As far as there's no WebSocket-core-protocol-level grammar error 
> (extension-param ABNF in RFC 6455), the server doesn't have to fail the 
> connection.

"doesn't have to fail" ..

So a server MAY fail the handshake instead of just skipping bad offers? Confused.

At least for me I have troubles with the word "decline" in "A server MUST decline .."

a) decline = silently skip

OR

b) decline = fail handshake

?

I'd prefer b) - why be too liberal here - , but am ok with a) also .. but please consider defining "decline" in the text.

Sorry: maybe it's just me, but I was really spending time with above question ..

> 
> 
>     4)
>     """
>        A client MUST _Fail the WebSocket Connection_ if the server accepted
>         a "permessage-deflate" offer with a response meeting any of the
>         following condition:
> 
>         o  The response has any extension parameter not defined for use in a
>            response.
> 
>         o  The response has any extension parameter with an invalid value.
> 
>         o  The response has multiple extension parameters with the same
>     name.
> 
>         o  The client doesn't support the configuration the response
>            represents.
>     """
> 
>     This list does not include: "The response corresponds to a PMCE
>     configuration not offered by the client originally".
>     Is this on purpose?
>     (A client may support a configuration which it did not offer .. for
>     whatever reasons)
> 
> 
> Yes. To allow multiple offers but make it unnecessary to identify 
> accepted request (e.g. we need to attach request ID or something to each 
> extension entry to do that), I made permessage-deflate responses 
> self-contained (both client side parameters and server side parameters 
> are listed in a response).
> 
> Each extension has sole discretion to consider what response to be 
> invalid/unsupported.

Lets say a client supports all features, but offers

permessage-deflate; s2c_max_window_bits=10

(hence, no fallback)

and the server responds:

permessage-deflate.

Autobahn client will FAIL that, since the PMCE response from the server does not match any offer, despite the reponse PMCE is supported.

If it would accept that, why would there be a need to offer explicit fallbacks like

permessage-deflate; s2c_max_window_bits=10, permessage-deflate

?