Empty line after headers
Julien ÉLIE
julien at trigofacile.com
Sat Aug 23 15:29:49 UTC 2008
Hi,
art = SMretrieve(token, RETR_HEAD);
returns the header *with* the empty line at its end.
Therefore, the result of the HEAD command is not RFC-compliant.
I see that SMretrieve for RETR_HEAD is called at several places in the code.
After a quick glance, I do not think the empty line is used at any moment.
However, the result depends on the storage method. I have not checked
whether each method returns the empty line.
An easy fix is:
--- innd/nc.c (révision 7952)
+++ innd/nc.c (copie de travail)
@@ -306,7 +306,7 @@
WCHANappend(cp, " 0 ", 3);
WCHANappend(cp, p, strlen(p));
WCHANappend(cp, NCterm, strlen(NCterm));
- WCHANappend(cp, art->data, art->len);
+ WCHANappend(cp, art->data, art->len - 2);
/* Write the terminator. */
NCwritereply(cp, NCdot);
Should I check whether art->len is > 2? I think it cannot happen but...
Or I could fix the return of SMretrieve directly. But I do not know
the impact it will trigger off...
--
Julien ÉLIE
« Non licet omnibus adire Corinthum. » (proverbe issu du grec)
More information about the inn-workers
mailing list