email
email copied to clipboard
Preserve upper and lower case for header keys.
Even if it doesn't make any difference according to the standards, there is one in practice. For example, rspamd increases the spam score for Mime-Version (instead of MIME-Version). Some time ago the code in this repo was changed to set MIME-Version instead of Mime-Version. But the usage of net/textproto applies CanonicalMIMEHeaderKey on all header keys which changes MIME-Version back to Mime-Version. https://github.com/golang/go/issues/29965 suggets forking net/textproto.