RFC Errata
RFC 6376, "DomainKeys Identified Mail (DKIM) Signatures", September 2011
Note: This RFC has been updated by RFC 8301, RFC 8463, RFC 8553, RFC 8616
Source of RFC: dkim (sec)
Errata ID: 4875
Status: Held for Document Update
Type: Editorial
Publication Format(s) : TEXT
Reported By: Emiel Bruijntjes
Date Reported: 2016-12-01
Section 3.5 says:
The header field text itself must encode the vertical bar ("|", %x7C) character (i.e., vertical bars in the "z=" text are meta-characters, and any actual vertical bar characters in a copied header field must be encoded). Note that all whitespace must be encoded, including whitespace between the colon and the header field value. After encoding, FWS MAY be added at arbitrary locations in order to avoid excessively long lines; such whitespace is NOT part of the value of the header field and MUST be removed before decoding.
It should say:
The header field value itself must encode the vertical bar ("|", %x7C) character (i.e., vertical bars in the "z=" text are meta-characters, and any actual vertical bar characters in a copied header field must be encoded). Note that all whitespace must be encoded, including whitespace between the colon and the header field value. After encoding, FWS MAY be added at arbitrary locations inside the header field value in order to avoid excessively long lines; such whitespace is NOT part of the value of the header field and MUST be removed before decoding. FWS MAY NOT be added to the header field name.
Notes:
The original text is confusing on whether FWS may be added to just the header field values or to both the header field names and header field values. The ABNF suggests that it is just allowed inside the values, but we've seen in practice that this whitespace is also added to the field names.
Further more, the use of the three terms "header field name", "header field value" and "header field text" is confusing. It is better to stick with just "header field name" and "header field value".