Article View: news.software.nntp
Article #48612Re: Maximum lengths/values of various fields?
From: Jeremy
Date: Mon, 02 Oct 2000 00:00
Date: Mon, 02 Oct 2000 00:00
46 lines
2697 bytes
2697 bytes
Rick Langston <langston@pagesz.net> wrote: > * What is the minimum and maximum value of an article number? Minimum is 1; maximum is system-dependant. I don't think anyone has ever attempted to codify a maximum within the protocol. Implementors should probably just be aware that if they take things higher than the usual long, there may be problems. But if you're implementing a client, you won't be generating the numbers, just reading them, so you should probably code it to deal with as large a value as you can. > * What is the maximum length of a subject string? This is limited by the line length limit of various implementations; the Subject isn't part of a command, so it theoretically shouldn't matter, but it does. You'll want to keep the Subject line (including the header name) well under 512 bytes. But you'll want to keep it much shorter than that anyway, so there shouldn't be a problem with simply imposing an arbitrary limit. > * What is the maximum length of a message-id? Command length applies, as message-ids are sent as part of commands. But *please* don't generate message-ids 500 characters long. Take Pine as an example of what *not* to do. :) For a client, I'd recommend coding it to deal with an arbitrarily long message-id, just in case, but to generate nice and short ones. What to do if you actually *get* a message-id too long to fit into an NNTP command, and end up having to request that article by message-id or something, is up to you; spontaneous combustion, while tempting, is probably not a failure mode your users will appreciate. > * What is the maximum length of a record in a message body? Whadda ya mean, "record"? You mean line length? Same consideration as for the Subject, the line length limits of some implementations. Don't generate any over (say) 500 characters, but accept them as long as you can. Of course, warn the user with flood, famine, and disease if his lines are that long. Human-readable articles shouldn't go over 80 characters. -- Jeremy ( jeremy@exit109.com | bofh@netscum.dk )
Technical Details
Message-ID:
<970513885.417333@news.netscum.dk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<OV1C5.532$dB6.48596@news-reader.ntrnet.net>Show Full Headers
Complete Article Headers
Message-ID: <970513885.417333@news.netscum.dk> Subject: Re: Maximum lengths/values of various fields? Date: Mon, 02 Oct 2000 00:00:00 +0000 From: Jeremy <bofh@netscum.dk> References: <OV1C5.532$dB6.48596@news-reader.ntrnet.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 676739966 Organization: There Is No Organization X-Meow: Meow Newsgroups: news.software.nntp