🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #68389

Re: Which MIME headers are the same as non-MIME?

#68389
From: Russ Allbery
Date: Tue, 02 Mar 2004 21:10
37 lines
2733 bytes
Gregg Woodcock <woodcock@sisna.com> writes:

> I am trying to cut down on bytes in my software and don't want to store
> redundant header information if I don't have to.  I am assuming that
> this group of headers is the same as not having a MIME header at all:

>    MIME-Version: 1.0
>    Content-Type: text/plain; charset=us-ascii
>    Content-Transfer-Encoding: 7bit

> I also assume that if the last line (Content-Transfer-Encoding) is
> missing that it is safe to assume 7bit.

If your message is a valid text/plain MIME message with a character set of
us-ascii, you *do* want to include the MIME-Version header.  I believe
that so long as you include MIME-Version, declaring your message to be
MIME, you can omit the remaining headers above, since they're the
defaults.

The reason to include the MIME-Version header is the same as the reason to
put a DTD declaration at the top of your web pages.  Without it being
there, software has to assume that your message was generated by a
pre-MIME engine and will have to guess about the content of the message.
It will probably guess right, but there's no need to make it go to the
effort.

> Is this correct?  Is it safe to ignore the charset value entirely if
> the CTE is 7bit?

No.  I mean, it probably is okay in practice, but the standards don't say
that.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <878yijarba.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!feed2.news.rcn.net!feed1.news.rcn.net!rcn!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
References: <74f1a64.0403021255.550ffb5c@posting.google.com>

Show Full Headers
Complete Article Headers
Message-ID: <878yijarba.fsf@windlord.stanford.edu>
Subject: Re: Which MIME headers are the same as non-MIME?
Date: Tue, 02 Mar 2004 13:10:17 -0800
From: Russ Allbery <rra@stanford.edu>
References: <74f1a64.0403021255.550ffb5c@posting.google.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!feed2.news.rcn.net!feed1.news.rcn.net!rcn!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 37
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 1078261817 18321 171.64.19.147 (2 Mar 2004 21:10:17
 GMT)
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Common Lisp, linux)
Cancel-Lock: sha1:8Zvc9+oVR0/O0SDc0+/841dGOHU=