зеркало из https://github.com/microsoft/git.git
git-imap-send: Strip smtp From_ header from imap message.
Cyrus imap refuses messages with a 'From ' Header. [jc: Mike McCormack says this is fine with Courier as well.] Signed-off-by: Markus Amsler <markus.amsler@oribi.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
17b96be29a
Коммит
e0b0830726
|
@ -1226,6 +1226,14 @@ split_msg( msg_data_t *all_msgs, msg_data_t *msg, int *ofs )
|
|||
if (msg->len < 5 || strncmp( data, "From ", 5 ))
|
||||
return 0;
|
||||
|
||||
p = strchr( data, '\n' );
|
||||
if (p) {
|
||||
p = &p[1];
|
||||
msg->len -= p-data;
|
||||
*ofs += p-data;
|
||||
data = p;
|
||||
}
|
||||
|
||||
p = strstr( data, "\nFrom " );
|
||||
if (p)
|
||||
msg->len = &p[1] - data;
|
||||
|
|
Загрузка…
Ссылка в новой задаче