Re: Questions about QPACK

Dmitri Tikhonov <dtikhonov@litespeedtech.com> Fri, 22 November 2019 18:51 UTC

Return-Path: <dtikhonov@litespeedtech.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 388A01208D2 for <quic@ietfa.amsl.com>; Fri, 22 Nov 2019 10:51:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=litespeedtech-com.20150623.gappssmtp.com
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 uQ9W-oF3DOcB for <quic@ietfa.amsl.com>; Fri, 22 Nov 2019 10:51:25 -0800 (PST)
Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 231341208A1 for <quic@ietf.org>; Fri, 22 Nov 2019 10:51:25 -0800 (PST)
Received: by mail-qt1-x835.google.com with SMTP id r20so8891830qtp.13 for <quic@ietf.org>; Fri, 22 Nov 2019 10:51:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=litespeedtech-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=WSFO0IylimsSSJNuWpX3HIUjKhukUTvDoWHR1NmBr2E=; b=FfPe4lyqporWjirBoAuLRdUTAst6DYkAYDYlNHBoqFcBH0k5M0ifjAxQQ8CpNO9D+U MQnLKxPNUC/zXXO4FCVNr7fOZJbsfZYJpuSvzvcw8Nv9r4hvdMMO/7OMN0aOvU4s+aYw 34F9b86g66d1wq1iNINz6bJmwMiizh+AMrZj/g5+4KGGbhuU8wCyBkCM+7h6NE5mU6Zi vmXmUTdZYUy1Wuw632QdChUnN3f0D4gDiquaOTVo2UbvbIR/+W/vznUK91CP3Z5jfxDZ LwiBOt7IVkcXll392pMBYeUUoLAAmRZnzsNiUSDKUv6rsSt0+Svu8daILnaeEoc6quTE B+Qw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=WSFO0IylimsSSJNuWpX3HIUjKhukUTvDoWHR1NmBr2E=; b=HmqNJ3BKXEwWe+isKIBZC79s/0ymTR3zoStEK7E6iDuv1E+SYvwTeVgOPbaNPmH58z cLxrueWbTD7+cIuCu1ynKSSzjKlu9cXrmNERwWxPMYFQSUtrFYcv/KQV/r2+fQgU2/BZ k08TBXGX8CSRaTsZ7hVGd/cvtG5hX48d8fsIkGzme2vsou0NxgtBx6JkbIuAGS15gYsK Vf7kvP5gkTJWwHdr7JQXeaMmuvlsfQys/q2brZDr0/uGrL2ZELzhiHkRZ7jdBmjtYiM+ 6nvTAK+9lcZ7nxy1wqOjbONJJNLesVHcdu65e8RpkyxK6vMRYsftboS3XgEeHMIYuR79 AYwg==
X-Gm-Message-State: APjAAAWpKnksISIOxeOhamX1KPJmwSqc2IFhst01/1PPRsqm15ULZbPR zc2HeWuX37j/4Sz5C4VCxKL3zQ==
X-Google-Smtp-Source: APXvYqw88EyA+evCZsB2b/d6o50CNZ4LT+f9uBeec87gtSTSthKMmhmee6gcKCbsQY0L8Kvs+Za3UQ==
X-Received: by 2002:ac8:5412:: with SMTP id b18mr16153629qtq.34.1574448684218; Fri, 22 Nov 2019 10:51:24 -0800 (PST)
Received: from ubuntu-dmitri (ool-2f1636b6.static.optonline.net. [47.22.54.182]) by smtp.gmail.com with ESMTPSA id w12sm3449951qka.130.2019.11.22.10.51.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Nov 2019 10:51:23 -0800 (PST)
Date: Fri, 22 Nov 2019 13:51:19 -0500
From: Dmitri Tikhonov <dtikhonov@litespeedtech.com>
To: 漂泊的梦 <78690842@qq.com>
Cc: Bence Bék <bnc@chromium.org>, Jiuhai Zhang <jiuhai.zhang@gmail.com>, quic <quic@ietf.org>
Subject: Re: Questions about QPACK
Message-ID: <20191122185118.GA26949@ubuntu-dmitri>
Mail-Followup-To: 漂泊的梦 <78690842@qq.com>, Bence Bék <bnc@chromium.org>, Jiuhai Zhang <jiuhai.zhang@gmail.com>, quic <quic@ietf.org>
References: <CAG9+TpYtZniZ63xc3Wpb7NNpkVyj1G9_p-rtCjspdCr+oz8edg@mail.gmail.com> <CACMu3tq6q+UDyyUqQHC_VK0gxGSnBj_=1DsnmRMHPChgawL0tw@mail.gmail.com> <20191121162545.GB27974@ubuntu-dmitri> <tencent_DB09B2AF02DB80EEDA41023F6A968A1E3509@qq.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <tencent_DB09B2AF02DB80EEDA41023F6A968A1E3509@qq.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/YK4ix5nUYQlGS8ukQUsnX-QqHJo>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Nov 2019 18:51:27 -0000

On Sat, Nov 23, 2019 at 01:23:41AM +0800, 漂泊的梦 wrote:
> Thanks for your reply. There is some misunderstanding about Q2.

To quote Q2 from the original email:

>> https://tools.ietf.org/html/draft-ietf-quic-qpack-11#section-4.5.4
>> 
>>         0   1   2   3   4   5   6   7
>>       +---+---+---+---+---+---+---+---+
>>       | 0 | 1 | N | T |Name Index (4+)|
>>       +---+---+---+---+---------------+
>>       | H |     Value Length (7+)     |
>>       +---+---------------------------+
>>       |  Value String (Length bytes)  |
>>       +-------------------------------+
>> 
>> Q2:when we encode new name, new value, we should insert name,value
>> pair into dynamic table, should we insert name only into dynamic
>> table?

The answer to "should" is "depends on what you want to do."  (See below).

> The background is that when the sender inserts the pair of name &amp;
> value into dynamic table, it should also send the pair of name &amp;
> value and index to recipient through encoder stream.&nbsp; In case
> that the pair of name &amp; value cannot be found, we can search by
> name only.&nbsp; The question is that in order to search by name only,
> can we&nbsp;insert name only (without value or with 0-length value)
> and index into the dynamic table, and then send the name and index to
> recipient through encoder stream?  If we don't insert name only and
> index into the dynamic table, how can we search by name only?

Yes, it is valid to insert into the dynamic table an entry with 0-length.
This is useful when the header name repeats, but the value does not.  In
that case, you can reference the dynamic table from the header block via
the Literal Header Field With Name Reference instruction (listed in the
original Q2 above).

  - Dmitri.