[net.news.b] header.c

glenn@nsc.UUCP (06/04/83)

I've installed the changes to header.c that Mark sent out a few days ago
(bringing it to version 2.19) and have found what seems to be a bug.

One of the changes from the 2.10 distribution version is to add the variable
seenrelay, which indicates whether a "Relay-version:" header line has been
seen yet.  The variable is used in the routine type() to determine whether a
"From:" header line is to be treated as a FROM line or a PATH line.  The change
is:
	if (its("From: "))
!		if (index(ptr, '@') && !index(ptr, '!'))
			return FROM;
		else
			return PATH;
***********
	if (its("From: "))
!		if (index(ptr, '@') && !index(ptr, '!') && !seenrelay)
			return FROM;
		else
			return PATH;

I don't understand why this variable is relevant to the decision.
Including it makes readnews think that legitimate "From:" lines aren't,
which in turn causes article headers (in the msgs interface, at least),
to be less informative than they should be;  instead of generating
"machine!person (Real Name @ Organization)", readnews generates only
"machine!person".

Can someone explain why seenrelay exists and whether this effect is
intentional?

		-- Glenn Skinner, National Semiconductor
		...!{fortune,menlo70}!nsc!glenn
		(408) 733-2600 x 335

mark@cbosgd.UUCP (06/05/83)

Seenrelay is needed to detect whether your neighbor is a 2.9 or 2.10 site.
If 2.9, it must intuit a Path and From line from the 2.9 From line.
If 2.10, it should leave the From line alone.  Without this check,
it usually works anyway because it guesses by whether the From line
has an @ in it.  But it's still possible for paths to have @'s.

The fix posted did indeed have a ! backwards.

	Mark