Re: [netmod] Last Call: <draft-ietf-netmod-artwork-folding-07.txt> (Handling Long Lines in Inclusions in Internet-Drafts and RFCs) to Best Current Practice

Paul Kyzivat <> Fri, 02 August 2019 16:16 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id AF60912028E; Fri, 2 Aug 2019 09:16:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id xxptkUab1QHt; Fri, 2 Aug 2019 09:16:40 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id BB0E812025F; Fri, 2 Aug 2019 09:16:39 -0700 (PDT)
Received: from MacBook-Pro.localdomain ( []) (authenticated bits=0) (User authenticated as pkyzivat@ALUM.MIT.EDU) by (8.14.7/8.12.4) with ESMTP id x72GGZ2j032639 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 2 Aug 2019 12:16:37 -0400
To: Erik Auerswald <>, Kent Watsen <>
Cc: Ignas Bagdonas <>, "" <>,, IETF discussion list <>, "" <>
References: <> <> <> <> <>
From: Paul Kyzivat <>
Message-ID: <>
Date: Fri, 02 Aug 2019 12:16:34 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <>
Subject: Re: [netmod] Last Call: <draft-ietf-netmod-artwork-folding-07.txt> (Handling Long Lines in Inclusions in Internet-Drafts and RFCs) to Best Current Practice
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 02 Aug 2019 16:16:43 -0000

On 8/2/19 9:22 AM, Erik Auerswald wrote:
> Hi Paul,
> I'll try to elaborate on my understanding of "forced folding" below:
> On 02.08.19 02:08, Paul Kyzivat wrote:
>> On 7/31/19 3:41 PM, Kent Watsen wrote:
>>> [...]
>>>> 2) Regarding forced folding in section 8.2.1: step 1 (Determine 
>>>> where the fold will occur) could benefit from some elaboration 
>>>> regarding lines that require forced folding. In particular, when an 
>>>> input line flagged for forced folding ends in backslash, then it 
>>>> must indeed be folded before the last character, while in all other 
>>>> cases it can be folded at any position prior to the max line length. 
>>>> (While this is obvious if you think about it, some might miss this.)
> If the original text data contains the folding sequence, one line of
> that text data ends in a backslash. If such a line is folded before
> the backslash, the folded data still contains the folding sequence that
> came from the original text data (in addition to the folding sequences
> inserted by folding).
> As I see it, forced folding would insert a new folding sequence inside
> of the original folding sequence.
> Example before folding:
> foo\
>    \bar
> Example after folding:
> == NOTE: '\\' line wrapping per BCP XX (RFC XXXX) ==
> foo\\
> \
>    \bar

OK. I was still thinking of it a bit wrong.

> A line that requires forced folding and that is already of maximum
> length would be lengthened by forced folding, thus it would need to
> be folded twice.
> This, of course, shows that unfolding must not recursively try to
> unfold an already unfolded part of a line again.
>> [...]
>> (Or do you want to allow the degenerate case where the line is folded 
>> at the end, so the continuation contains nothing?)
> I'd say that this degenerate case is required for forced folding to
> work.

Yeah, it seems so. It would be silly to do in any other case, but I 
guess it is not forbidden.

But now that I am thinking about this, it occurs to me that maybe the 
two methods can be collapsed into one:

just make the sequence to be inserted for folding be (using ABNF):

"\" %x0C [%x0A] *" " ["\"]

The trailing backslash only needs to be inserted if the character 
following it is a space or backslash. (IOW it is *optional* if the net 
character is *not* space or backslash.)

So, when removing the folding, upon finding ("\" %x0C [%x0A] *" ") you 
remove that and if there is then a backslash remove that too.