The Subject header body is folded here, but immediately after the header name. The real life example is when Message-ID body is too long to fit in
The real life example is when Message-ID body is too long to fit in the
same line with the header name (and that's why I detected it and started digging).
Russ Allbery wrote:
Header field lines do not have to be folded unless they contain RFC 2047
encoding (which the Message-ID header field may not), and may be as long
as 998 octets, and the maximum length of an FQDN is 254 octets if I
remember correctly. That leaves plenty of space. News software does not
expect a folded Message-ID and I suspect INN is far from the only piece of
It's even more restrictive (RFC 5536 3.1.3)
| msg-id = "<" msg-id-core ">"
| ; maximum length is 250 octets
| msg-id-core = id-left "@" id-right
[...]
| The <msg-id> MUST NOT be more than 250 octets in length.
Unfortunately (one of the changes from RFC 1036 which I did not like as
some programs may be not aware of this) Path can "now" be folded (RFC
5536 3.1.5):
| path = "Path:" SP *WSP path-list tail-entry *WSP CRLF
| path-list = *( path-identity [FWS] [path-diagnostic] "!" )
Header field lines do not have to be folded unless they contain RFC 2047 encoding (which the Message-ID header field may not), and may be as long
as 998 octets, and the maximum length of an FQDN is 254 octets if I
remember correctly. That leaves plenty of space. News software does not expect a folded Message-ID and I suspect INN is far from the only piece of
software that would break. It may not look aesthetically pleasing to have
a long line, but the standard effectively requires it.
I would, in general, never fold Path, Message-ID, or Date, since these are critical fields for the Netnews protocol and a lot of existing software
isn't going to handle it correctly. I think there are provisions in the standard for folding Path (I don't recall whether we restricted the Date syntax to disallow folding), but if you want to maximize how interoperable the articles are, it's best to avoid those provisions.
Unfortunately (one of the changes from RFC 1036 which I did not like as
some programs may be not aware of this) Path can "now" be folded (RFC
5536 3.1.5):
| path = "Path:" SP *WSP path-list tail-entry *WSP CRLF
| path-list = *( path-identity [FWS] [path-diagnostic] "!" )
Yeah, in retrospect that was probably a mistake.
Hi Urs and Russ,
Does RFC 1036 really say that Path cannot be folded?
So I believe RFC 5536 was just documenting what was going on with "!"
and spaces, and naturally folding on whitespace.
Hi Urs and Russ,
Does RFC 1036 really say that Path cannot be folded?
So I believe RFC 5536 was just documenting what was going on with "!"
and spaces, and naturally folding on whitespace.
I still think allowing FWS in Path is/was more asking for trouble than needed.
I know that a lot of older software had/has issues with FWS in
general and 992 bytes is plenty of space for Path, esp. if you avoid the often quite useless verification info.
The same goes for at least Date, Newsgroups and Followup-To.
If the Path header field does not allow FWS, the problem that would have
been to delt with in RFC 5536/5537 is Path trimming. As an FQDN can
have about 254 characters, and path diagnostics can also add a MISMATCH
with an additional FQDN, and a server can add several path identities...
Well, we cannot do much about that now.
but if you want to maximize how interoperable the articles are,
Back to the Message-ID. It seems that it's folded by some Microsoft
tools (what a surprise) -- some kind of online Outlook or
something. Here's the sample Message-ID:
Message-ID:
<YT3PR01MB6374D9DE3A7128AF7DE72EC1A253A@YT3PR01MB6374.CANPRD01.PROD.OUTLOOK.COM>
I'm wondering if there are some tools to unfold it (to reformat headers, because sometimes they should be folded), or should I reinvent the wheel
and write something to do it... are (any of) you aware of such tools?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 81:53:56 |
Calls: | 6,916 |
Calls today: | 1 |
Files: | 12,382 |
Messages: | 5,433,165 |