[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[leafnode-list] Leafnode 1.9.6 and TAB in headers
Leafnode cannot read articles with TAB character after field name in some
essential headers (ie. "From:", "Date:" etc). These fields are reported
missing in fetchnews and xoverutil (both uses constructions like
strncmp(line, "Field: ",7) ).
This patch allow leafnode to work with those articles by converting all
tabs in headers to spaces (I don't know if server is allowed to do such
things and I didn't found answer in RFC 977 yet).
-----------------------------------------------------------------------
*** fetchnews.c.orig Wed Dec 8 08:24:10 1999
--- fetchnews.c Wed Dec 8 08:53:30 1999
***************
*** 68,73 ****
--- 68,85 ----
int postarticles( void );
void fixxover( void );
+
+ void tabstospaces(char *s) {
+ while (*s)
+ {
+ if (*s=='\t')
+ *s=' ';
+ s++;
+ }
+
+ }
+
+
#ifdef NOTYET
static void _ignore_answer( FILE * f ) {
char * l;
***************
*** 805,810 ****
--- 817,824 ----
c = NULL;
n = 9; /* "other" header */
while ( (l = getaline( nntpin )) && strcmp( l, "." ) ) {
+ /* Quick && dirty fix */
+ tabstospaces(l);
/* allow for multiline headers */
if ( !isspace((unsigned char)l[0]) ) {
n = 0;
-----------------------------------------------------------------------
--
-----------------------------------------------------------------------
| Radosław Gancarz r_g<at>priv2;onet;pl |
--------------- All simple programs have been written -----------------
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list