Duplicate Xref: header
Julien ÉLIE
julien at trigofacile.com
Sun Dec 27 00:04:42 UTC 2009
Hi,
No special check is done regarding the Xref: header when innd receives
an article.
If it contains no Xref: header, one is added.
If it contains one Xref: header, it is replaced.
But if it contains more than one Xref: header, another one is added.
Is it wise to reject an article containing more than one Xref: header?
Current code (since February 2001) has been marking a non-required
duplicated header as non-existing. So for instance an innd filter
will not see it and that's why another one is added for Xref:, when there
are more than one Xref: header.
In art.c, I would tend to remove:
if (hc->Length != 0) {
/* Duplicated. */
hc->Length = -1;
} else {
so that the last header is considered (as it is done for nnrpd filters).
And reject an article containing more than one Xref: header? or only
replace its last occurrence? (Removing headers is something we do
not currently have within innd.)
Another point is that we have invalid values when virtualhost: is set
to true in readers.conf. A few headers are changed but the :bytes
metadata in OVER is not changed. If Xref:full is added twice in LIST
OVERVIEW.FMT, only the first one is changed.
If Path:full is in LIST OVERVIEW.FMT, it is not changed at all...
I am half-tempted to just mention it in the documentation of
virtualhost: instead of fixing that... especially the :bytes one.
Maybe the others can be quickly fixed; I have not checked.
There is also a deeper problem with the Path: header because it
is written in the overview as it is received by innd; it requires
to add yet another buffer like what is done for Xref: to store
the new Path: header. I think it should be fixed.
--
Julien ÉLIE
« En vérité, le chemin importe peu, la volonté d'arriver suffit à tout. »
More information about the inn-workers
mailing list