[hybi] permessage-compression / permessage-deflate configuration is too complex

Joakim Erdfelt <joakim@intalio.com> Thu, 25 April 2013 14:54 UTC

Return-Path: <joakim@intalio.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 E69FF21F93E5 for <hybi@ietfa.amsl.com>; Thu, 25 Apr 2013 07:54:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level:
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 BhZ1lj8DpwPm for <hybi@ietfa.amsl.com>; Thu, 25 Apr 2013 07:54:06 -0700 (PDT)
Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47]) by ietfa.amsl.com (Postfix) with ESMTP id 7F5E221F93E8 for <hybi@ietf.org>; Thu, 25 Apr 2013 07:53:50 -0700 (PDT)
Received: by mail-ee0-f47.google.com with SMTP id b57so1283620eek.20 for <hybi@ietf.org>; Thu, 25 Apr 2013 07:53:41 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=uFRnDaoYNIdC3vqZVu9kuDrxhmtyMt18eFn+pOYwiS0=; b=PNjTVIeCUdtqf7/JQX/G8mvqA4PxruEb4bPvWXom9hlyVTWx8IdrilwNyhhJzXcEpc 0gQLl+vfvSMLw5A85zWSdRfICSJTfAWfo6UEURQ7+q25C6gO94alvejL1U8ca6kBvYgh 5/KlfPOAQT0Lif5wEn7zqq0cj0O0Aa7NS9wSct+LZMcNOfaLJ9v1Ohe0zuNxFGHyI212 ZgAcrnQM5IjfQCGo45v8Czmmtv9MKDitsjpIycRTtTQii6fMJ0ab7RMjLJ/on8zY7sLW xKt5vjI75IJ/dJq74PSsCiFZpzrvxBHhf56eThd87YFzG0PSfI0PZRyT7eP3z8+wSt/B hs6A==
MIME-Version: 1.0
X-Received: by 10.14.87.199 with SMTP id y47mr76663982eee.17.1366901621529; Thu, 25 Apr 2013 07:53:41 -0700 (PDT)
Received: by 10.15.108.70 with HTTP; Thu, 25 Apr 2013 07:53:41 -0700 (PDT)
Date: Thu, 25 Apr 2013 07:53:41 -0700
Message-ID: <CAG4zZZDhm-t=GXZXk3_hHN9vYJcgNYFBC-5REs0faCyARoKz3A@mail.gmail.com>
From: Joakim Erdfelt <joakim@intalio.com>
To: hybi@ietf.org
Content-Type: multipart/alternative; boundary="001a11c29c60997f3904db3095bb"
X-Gm-Message-State: ALoCoQkkw5jbFhnBgIenE1qkj4WdrZ+r4KMG9/C3YhqAYLmCwgHMJfezM2NukHsZRDRxDDQPJZ04
Subject: [hybi] permessage-compression / permessage-deflate configuration is too complex
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: Thu, 25 Apr 2013 14:54:08 -0000

How can a server side implementation respond on a the extension negotiation
for this spec, using the permessage-deflate saying, "sorry, we don't
support the C-library tweaks present in the spec and will only use default
behavior" or to say "sorry, we don't support the C-library tweaks present
in the spec and will only use the following behavior for both c2s and s2c
streams"

The current language in permessage-compression-09 (Section 8) says:

   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.

That last bullet point is the crux of the problem I'm facing.  How can the
negotiation indicate that "yes, i support permessage-deflate, but only this
specific configuration, that doesn't match up to your configuration to
permessage-deflate"

I'd like to propose that all of the following concepts be removed from the
permessage-deflate and just standardized for specific default behavior
based on a sensible set of defaults (lowest common denominator?), similar
to how HTTP's content codings work (the http spec does not tweak
compression algorithms) ...

c2s_max_window_bits
c2s_no_context_takeover

s2c_max_window_bits
s2c_no_context_takeover

from a Java point of view these are not possible to support without
re-implementing the entire java.util.zip.Deflate library in each java
application. (default Deflate support, that ships with every copy of Java
since 1.0, just does not support these tweaks)

--
Joakim Erdfelt <joakim@intalio.com>
webtide.com <http://www.webtide.com/>
Developer advice, services and support
from the Jetty & CometD experts
eclipse.org/jetty - cometd.org