diff src/post.c @ 247:7a830ce3211e noffle

[svn] *** empty log message ***
author mirkol
date Tue, 26 Mar 2002 17:52:01 +0000
parents fbff73fe5b40
children baa6408d1bbc
line wrap: on
line diff
--- a/src/post.c	Fri Mar 15 15:25:46 2002 +0000
+++ b/src/post.c	Tue Mar 26 17:52:01 2002 +0000
@@ -1,7 +1,7 @@
 /*
   post.c
 
-  $Id: post.c 371 2002-02-26 17:13:31Z bears $
+  $Id: post.c 379 2002-03-26 17:52:01Z mirkol $
 */
 
 #if HAVE_CONFIG_H
@@ -184,31 +184,40 @@
     article.text = s;
 
     replyToFound = pathFound = orgFound = FALSE;
-    
+
+    field[ 0 ] = '\0';
+
     /* Grab header lines first, getting overview info as we go. */
     while ( ( p = Utl_getHeaderLn( line, p ) ) != NULL
 	    && line[ 0 ] != '\0'
 	    && Prt_getField( field, value, line ) )
     {
+        if ( field [ 0 ] == '\0' )
+        {
+            /* Error! Continuation without preceding header. */
+            Log_err( "First header line started with white space" );
+            return FALSE;
+        }
 	/* Look for headers we need to stash. */
 	if ( strcmp( field, "subject" ) == 0 )
 	{
-	    Utl_cpyStr( article.over.subject, value );
+	    Utl_catStr( article.over.subject, value );
 	    DynStr_appLn( s, line );
 	}
 	else if ( strcmp ( field, "from" ) == 0 )
 	{
-	    Utl_cpyStr( article.over.from, value );
+	    Utl_catStr( article.over.from, value );
 	    DynStr_appLn( s, line );
 	}
 	else if ( strcmp ( field, "date" ) == 0 )
-	    Utl_cpyStr( article.over.date, value );
+	    Utl_catStr( article.over.date, value );
 	else if ( strcmp ( field, "references" ) == 0 )
 	{
-	    Utl_cpyStr( article.over.ref, value );
+	    Utl_catStr( article.over.ref, value );
 	    DynStr_appLn( s, line );
 	}
 	else if ( strcmp ( field, "message-id" ) == 0 )
+	/*    Utl_catStr( article.over.msgId, value ); */
 	    Utl_cpyStr( article.over.msgId, value );
 	else if ( strcmp ( field, "newsgroups" ) == 0 )
 	{