diff -ru swish++-6.1.5.old/mod/mail/mod_mail.c swish++-6.1.5/mod/mail/mod_mail.c --- swish++-6.1.5.old/mod/mail/mod_mail.c 2005-04-04 00:38:15.000000000 +0200 +++ swish++-6.1.5/mod/mail/mod_mail.c 2012-01-11 11:58:16.078956336 +0100 @@ -644,25 +644,23 @@ if ( !is_space( *c ) ) goto more_headers; // - // The first character on the next line is whitespace: see how much of - // the rest of the next line is also whitepace. + // The first character on the next line is whitespace: see if it + // is a null line. // - do { - if ( *c == '\r' || *c == '\n' ) { - // - // The entire next line is whitespace: consider it the end of - // all the headers and therefore also the end of this value. - // Also skip the blank line. - // - c = skip_newline( c, end ); - goto last_header; - } - } while ( ++c != end && is_space( *c ) ); + if ( *c == '\r' || *c == '\n' ) { + // + // The next line has nothing before newline: consider it the end + // of all the headers and therefore also the end of this value. + // Also skip the blank line. + // + c = skip_newline( c, end ); + goto last_header; + } // - // The next line has at least one non-leading non-whitespace character; - // therefore, it is a continuation of the current header's value: - // reposition "nl" and start over. + // The next line has at least one leading non-newline whitespace + // character; therefore, it is a continuation of the current header's + // value: reposition "nl" and start over. // if ( (nl = find_newline( c, end )) == end ) break;