INTERNET-DRAFT                               Charles H. Lindsey
Usenet Format Working Group                  University of Manchester
                                             July 2001

4.2.3. White Space and Continuations

Previous Up Next
4.2.3.  White Space and Continuations
   Each header is logically a single line of characters comprising the
   header-name, the colon with its following SP, and the header-content.
   For convenience, however, the header-content can be split into a
   multiple line representation; this is called "folding". The general
   rule is that wherever this standard allows for FWS or CFWS (but not
   simply SP or HTAB) a CRLF may be inserted before any WSP. For
   example, the header:
      Approved: modname@modsite.example (Moderator of comp.foo.bar)
   can be represented as:
      Approved: modname@modsite.example
         (Moderator of comp.foo.bar)

        NOTE: Though header-contents are defined in such a way that
        folding can take place between many of the lexical tokens (and
        even within some of them), folding SHOULD be limited to placing
        the CRLF at higher-level syntactic breaks, and SHOULD also avoid
        leaving trailing WSP on the preceding line. For instance, if a
        header-content is defined as comma-separated values, it is
        recommended that folding occur after the comma separating the
        structured items, even if it is allowed elsewhere.

   Folding MUST NOT be carried out in such a way that any line of a
   header is made up entirely of WSP characters and nothing else.

   The colon following the header name on the first line MUST be
   followed by a WSP, even if the header is empty. If the header is not
   empty, at least some of the content MUST appear on the first line
   (this is to avoid the possibility of harm by any non-compliant agent
   that might eliminate a trailing SP). Posting agents MUST enforce
   these restrictions, but relaying agents SHOULD accept even articles
   that violate them.



        NOTE: This standard differs from [RFC 2822] in requiring that
        WSP followng the colon (it was also an [RFC 1036] requirement).

   Posters and posting agents SHOULD use SP, not HTAB, where white space
   is desired in headers (some existing software expects this), and MUST
   use SP immediately following the colon after a header-name. Relaying
   agents SHOULD accept HTAB in all such cases, however.

   Since the white space beginning a continuation line remains a part of
   the logical line, headers can be "broken" into multiple lines only at
   FWS or CFWS. Posting agents Ought Not to break headers unnecessarily
   (but see 4.5).

Previous Up Next
Previous draft (04): 4.2.3. White Space and Continuations

Diffs to previous draft

--- {draft-04}	Wed Jul 11 21:55:10 2001
+++ {draft-05}	Wed Jul 11 21:55:10 2001
@@ -1,7 +1,4 @@
 
4.2.3.  White Space and Continuations
-[The following text is taken from [MESSFOR], adapted to the different
-terminology used for this standard.]
-
    Each header is logically a single line of characters comprising the
    header-name, the colon with its following SP, and the header-content.
    For convenience, however, the header-content can be split into a
@@ -34,8 +31,10 @@
    these restrictions, but relaying agents SHOULD accept even articles
    that violate them.
 
-        NOTE: This standard differs from [MESSFOR] in requiring that WSP
-        followng the colon (it was also an [RFC 1036] requirement).
+
+
+        NOTE: This standard differs from [RFC 2822] in requiring that
+        WSP followng the colon (it was also an [RFC 1036] requirement).
 
    Posters and posting agents SHOULD use SP, not HTAB, where white space
    is desired in headers (some existing software expects this), and MUST
@@ -45,5 +44,5 @@
    Since the white space beginning a continuation line remains a part of
    the logical line, headers can be "broken" into multiple lines only at
    FWS or CFWS. Posting agents Ought Not to break headers unnecessarily
-   (but see 4.5
+   (but see 4.5).