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

[svn] *** empty log message ***
author mirkol
date Tue, 26 Mar 2002 17:52:01 +0000
parents 4e69e9b722ae
children 0340b9c17edc
line wrap: on
line diff
--- a/src/protocol.c	Fri Mar 15 15:25:46 2002 +0000
+++ b/src/protocol.c	Tue Mar 26 17:52:01 2002 +0000
@@ -1,7 +1,7 @@
 /*
   protocol.c
 
-  $Id: protocol.c 375 2002-03-15 10:50:33Z bears $
+  $Id: protocol.c 379 2002-03-26 17:52:01Z mirkol $
 */
 
 #if HAVE_CONFIG_H
@@ -166,19 +166,27 @@
     Utl_cpyStr( lineLower, line );
     Utl_toLower( lineLower );
     p = Utl_stripWhiteSpace( lineLower );
-    dst = resultField;
-    while ( ! isspace( *p ) && *p != ':' && *p != '\0' )
-        *(dst++) = *(p++);
-    *dst = '\0';
-    while ( isspace( *p ) )
-        ++p;    
-    if ( *p == ':' )
+    if ( p == lineLower )
     {
-        ++p;
-        strcpy( t, line + ( p - lineLower ) );
-        p = Utl_stripWhiteSpace( t );
-        strcpy( resultValue, p );
-        return TRUE;
+        dst = resultField;
+        while ( ! isspace( *p ) && *p != ':' && *p != '\0' )
+            *(dst++) = *(p++);
+        *dst = '\0';
+        while ( isspace( *p ) )
+            ++p;    
+        if ( *p == ':' )
+        {
+            ++p;
+            strcpy( t, line + ( p - lineLower ) );
+            p = Utl_stripWhiteSpace( t );
+            strcpy( resultValue, p );
+            return TRUE;
+        }
+    }
+    else        /* continued header.  */
+    {
+            strcpy( resultValue, lineLower ); /* include starting whitespace */
+            return TRUE;
     }
     return FALSE;
 }