git-svn: support for funky branch and project names over HTTP(S)
[gitweb.git] / git-send-email.perl
index 2b1f1b598c62ddaed693635adef12e490f49838f..e8354c760be11eec7c0b74b62aeaf4ec95a85d91 100755 (executable)
@@ -527,7 +527,7 @@ sub send_message
                $ccline = "\nCc: $cc";
        }
        my $sanitized_sender = sanitize_address($sender);
-       make_message_id();
+       make_message_id() unless defined($message_id);
 
        my $header = "From: $sanitized_sender
 To: $to${ccline}
@@ -643,6 +643,9 @@ sub send_message
                                        }
                                        push @xh, $_;
                                }
+                               elsif (/^Message-Id: (.*)/i) {
+                                       $message_id = $1;
+                               }
                                elsif (!/^Date:\s/ && /^[-A-Za-z]+:\s+\S/) {
                                        push @xh, $_;
                                }
@@ -711,7 +714,8 @@ sub send_message
                        else {
                                push @xh,
                                  'MIME-Version: 1.0',
-                                 "Content-Type: text/plain; charset=$author_encoding";
+                                 "Content-Type: text/plain; charset=$author_encoding",
+                                 'Content-Transfer-Encoding: 8bit';
                        }
                }
        }
@@ -727,6 +731,7 @@ sub send_message
                        $references = "$message_id";
                }
        }
+       $message_id = undef;
 }
 
 if ($compose) {