Re: [apps-discuss] R: Re: Question about RFC 7239

Matthew Kerwin <matthew@kerwin.net.au> Sun, 28 August 2016 23:22 UTC

Return-Path: <phluid61@gmail.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3FAE112D0A7 for <apps-discuss@ietfa.amsl.com>; Sun, 28 Aug 2016 16:22:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.347
X-Spam-Level:
X-Spam-Status: No, score=-2.347 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 qtxWtmjlQTuD for <apps-discuss@ietfa.amsl.com>; Sun, 28 Aug 2016 16:22:15 -0700 (PDT)
Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (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 4F57012B01A for <apps-discuss@ietf.org>; Sun, 28 Aug 2016 16:22:15 -0700 (PDT)
Received: by mail-it0-x232.google.com with SMTP id x131so77722234ite.0 for <apps-discuss@ietf.org>; Sun, 28 Aug 2016 16:22:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=afub5+z49J8FqQJzYfhkxeoNqV6uJBK9e6xGQVU2W7A=; b=YUINBQ0XarwZAkscTcfRKPkfAiypBTUCdxQspS+c4wDva6Hiyh8iI8NqNFWUOM7mbA bO4rgzc2kplnRqxncrenIZoqjE3g/M/XA82mLQ2zD48Xc5ZPHrXrJEzc8DfeSW5W3C1w eWYvQq9/agg6N1wmt84vmJTfbcdzQZyliUAau3qTLR12KKOiB4QHWP6jXSwe4TRbn5EB S16+yAmnoOZyw4Ns2DwfM093jR3v8tAS8n0Km5McACNr/zSa925SKIq/n8dyNicsXfin LlvZJUqVb7OvD9vT2qq1bTPFmYzaSLzOcLBRqmI42DLTlgW04mo/kbbc5YTo3WZRjFjm 7D9A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=afub5+z49J8FqQJzYfhkxeoNqV6uJBK9e6xGQVU2W7A=; b=Jrz1SagL7ChosHQQ0a7rEqYMnVDN9RTK5ofXbw4K4PdxC1HN0hLYgY6CANxDGD0Qxt k5QRP1tF4dJuuT/5Z1ohaZ0ZceENBRLRnUJQ0hJtfQnRGhABSuLGLOGK+mWmZGRSQC12 fQo+n2PHeSjaqU+0v3BOFwxH2Z7WJ9kWVZiNVyIRgAGAPKLAy8vkwoqB1GoD5xfV3lij eyWsyRq4v2XiZGGu7bdh5bFnW3xQz4cMlxy/2th6LSR/VQ3CoeAvRd+0HVUGrOQAGnFD ELWZThGrrrdhQNlNz7uB4xYYGOJnn+kpUWXr2coRRVxKb3w5Y921iMHzS4Ie/qF4i3XJ p57Q==
X-Gm-Message-State: AE9vXwNASyq43xvQ6ymPRBDAiChMNchcvBLP9PW2+jnEavdUcHEIpGMw5CCNyP+iU2hqPAR3fDtgiEbSobVS6w==
X-Received: by 10.36.102.194 with SMTP id k185mr11577683itc.45.1472426534619; Sun, 28 Aug 2016 16:22:14 -0700 (PDT)
MIME-Version: 1.0
Sender: phluid61@gmail.com
Received: by 10.107.158.207 with HTTP; Sun, 28 Aug 2016 16:22:13 -0700 (PDT)
In-Reply-To: <399542882.4083761472419322679.JavaMail.httpd@webmail-56.iol.local>
References: <399542882.4083761472419322679.JavaMail.httpd@webmail-56.iol.local>
From: Matthew Kerwin <matthew@kerwin.net.au>
Date: Mon, 29 Aug 2016 09:22:13 +1000
X-Google-Sender-Auth: nVmcymj1nZE2327TP4D4xrcB6zE
Message-ID: <CACweHNB4gNpuKTBJzvoFVe9NUAmOpx5xrzs5RqK6uf6jtciw_w@mail.gmail.com>
To: "luigipinca@libero.it" <luigipinca@libero.it>
Content-Type: multipart/alternative; boundary="001a1147ab448dd1f8053b2a047e"
Archived-At: <https://mailarchive.ietf.org/arch/msg/apps-discuss/IjJHmELgKbE9MeE-eFq__zvBrvw>
Cc: Julian Reschke <julian.reschke@gmx.de>, IETF Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] R: Re: Question about RFC 7239
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/apps-discuss/>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 28 Aug 2016 23:22:17 -0000

On 29 August 2016 at 07:22, luigipinca@libero.it <luigipinca@libero.it>
wrote:

> Thank you Julian but I still don't fully get it.
> According to the #rule extension as shown in your link,
>
> "foo , ,bar,"
>
> is a valid value, so I assume that in our case
>
> "; , ,"
>
> is also a valid value as forwarded-element is defined like this
>
> forwarded-element = [ forwarded-pair ] *( ";" [ forwarded-pair ] )
>
>
​The words in RFC 7230 say a lot more than the ABNF does. If you're
concerned about the parser you should accept "a reasonable number of empty
list elements"; but if you're generating headers you "MUST NOT generate
empty list elements." The question, then, is whether ";" is a valid
forwarded-element.

I believe the intention was to make Forwarded be a list of lists, where the
outer list (joined by commas) is as defined in RFC 7230, and the inner list
(joined by semicolons) has the same semantics for ignoring a reasonable
number of empty elements.

To that end, within a single forwarded-element, this might be acceptable: "
;for=1.2.3.4;;proto=http;" (Although I think you probably shouldn't
generate such a value.)

That said, that's only my reading. If it's the case, I suspect maybe it
wasn't made clear enough in RFC 7239.



> My main concern is actually on this definition. Why is forwarded-pair
> optional?
>
> Regards,
>
> Luigi
>

​Cheers​
-- 
  Matthew Kerwin
  http://matthew.kerwin.net.au/