Thread View: news.software.nntp
4 messages
4 total messages
Started by Rick Langston
Mon, 02 Oct 2000 00:00
Maximum lengths/values of various fields?
Author: Rick Langston
Date: Mon, 02 Oct 2000 00:00
Date: Mon, 02 Oct 2000 00:00
33 lines
2006 bytes
2006 bytes
In coding up my own NNTP client application, I came up with a couple of questions that didn't seem to be answered by RFC0977 or by the Common NNTP Extensions draft. I'm sure they've probably been discussed over time in this newsgroup.... * What is the minimum and maximum value of an article number? I would think that most applications code an article number as an unsigned int or unsigned long. It does not appear to be spec'd anywhere as to the max. Although it seems unlikely that any newsgroup would exceed 4.2B or even 2.1B messages any time soon, though, at least without a resetting of message numbers back to 1. Or is it possible to have a message number 0? * What is the maximum length of a subject string? RFC0977 makes mention of a 512-byte length of commands, but I don't know if this applies to subjects. * What is the maximum length of a message-id? Again no direct mention of this in the docs I could find. The difference here is that the user doesn't control the generation of this text, so it wouldn't seem to be arbitrarily long. * What is the maximum length of a record in a message body? Same issue as with subject. TIA for any information/discussion on this subject. -- Rick Langston <langston@pagesz.net> Home page at http://www.pagesz.net/~langston
Re: Maximum lengths/values of various fields?
Author: Russ Allbery
Date: Mon, 02 Oct 2000 00:00
Date: Mon, 02 Oct 2000 00:00
29 lines
1602 bytes
1602 bytes
Rick Langston <langston@pagesz.net> writes:
> * What is the minimum and maximum value of an article number?
draft-ietf-nntpext-base-10.txt, section 9.1:
Article numbers MUST lie between 1 and 4,294,967,295
inclusive.
> * What is the maximum length of a subject string?
The RFC 1036 replacement draft recommends that headers be folded, but
requires that all software handle header line lengths of at least 998
octets. Many implementations have problems with single header lines
longer than 1024 characters, but all implementations should support
headers of arbitrary length if folded.
> * What is the maximum length of a message-id?
The RFC 1036 replacement will limit them to 250 octets.
> * What is the maximum length of a record in a message body?
There is none.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Re: Maximum lengths/values of various fields?
Author: Andrew Gierth
Date: Mon, 02 Oct 2000 00:00
Date: Mon, 02 Oct 2000 00:00
42 lines
2401 bytes
2401 bytes
>>>>> "Rick" == Rick Langston <langston@pagesz.net> writes: Rick> In coding up my own NNTP client application, I came up with a Rick> couple of questions that didn't seem to be answered by RFC0977 Rick> or by the Common NNTP Extensions draft. I'm sure they've Rick> probably been discussed over time in this newsgroup.... Rick> * What is the minimum and maximum value of an article number? minimum is 1 maximum is 4294967295 (i.e. 2^32-1) Rick> * What is the maximum length of a subject string? theoretically unlimited (though in practice many servers will reject overlong header lines, e.g. >1023 chars before or after unfolding). Longest I've seen in the wild was 20k or so (someone had pasted an entire Make-Money-Fast article into the subject line of their post). My own server code rejects articles whose overview data would exceed 64k in total. Rick> RFC0977 makes mention of a 512-byte length of commands, but I Rick> don't know if this applies to subjects. That limit applies to commands and responses only, not to article headers, bodies or overviews. Rick> * What is the maximum length of a message-id? Message-ids have to fit on the NNTP command line, so that would limit them to about 500 bytes, but some software (and the USEFOR draft, I hope) limits them to 250 bytes including the <>. Rick> * What is the maximum length of a record in a message body? theoretically unlimited (other than by the maximum body size, which is a site policy issue) -- Andrew.
Re: Maximum lengths/values of various fields?
Author: 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 )
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads