|
|
| version 1.12, 2002/08/01 11:26:45 | version 1.14, 2002/12/05 08:08:59 |
|---|---|
| Line 7 | Line 7 |
| Parts of the code here is based upon an early gensock and blat | Parts of the code here is based upon an early gensock and blat |
| */ | */ |
| static const char* IDENT_SMTP_C="$Id$"; | static const char* IDENT_SMTP_C="$Date$"; |
| #include "pa_exception.h" | #include "pa_exception.h" |
| #include "smtp.h" | #include "smtp.h" |
| Line 342 transform_and_send_edit_data(const char | Line 342 transform_and_send_edit_data(const char |
| send_len = lstrlen(editptr); | send_len = lstrlen(editptr); |
| index = editptr; | index = editptr; |
| header_end = strstr(editptr, "\r\n\r\n"); | |
| while( !done ) | while( !done ) |
| { | { |
| // room for extra char for double dot on end case | // room for extra char for double dot on end case |
| Line 353 transform_and_send_edit_data(const char | Line 351 transform_and_send_edit_data(const char |
| { | { |
| case '.': | case '.': |
| if( previous_char == '\n' ) | if( previous_char == '\n' ) |
| { | SendBuffer(index, 1); // send _two_ dots... |
| /* send _two_ dots... */ | |
| SendBuffer(index, 1); | |
| } | |
| SendBuffer(index, 1); | SendBuffer(index, 1); |
| break; | break; |
| case '\r': | case '\n': // x\n -> \r\n |
| // watch for soft-breaks in the header, and ignore them | if( previous_char != '\r' ) { |
| if( index < header_end && (strncmp(index, "\r\r\n", 3) == 0) ) | SendBuffer("\r", 1); |
| index += 2; | SendBuffer(index, 1); |
| else | } |
| if( previous_char != '\r' ) | |
| SendBuffer(index, 1); | |
| // soft line-break (see EM_FMTLINES), skip extra CR */ | |
| break; | break; |
| default: | default: |
| SendBuffer(index, 1); | SendBuffer(index, 1); |
| break; | break; |