git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] send-email: add transfer encoding header with content-type

From
Jeff King <peff@peff.net>
Date
Nov 20, 2007, 12:54 UTC
Message-ID
<20071120125404.GB7998@sigill.intra.peff.net>
In-Reply-To
<20071119104950.GB8645@informatik.uni-freiburg.de>

We add the content-type header only when we have non-7bit characters from the 'From' header, so we really need to specify the encoding (in other cases, where the commit text needed a content-type, git-format-patch will already have added the encoding header).

Signed-off-by: Jeff King <peff@peff.net>
---
On Mon, Nov 19, 2007 at 11:49:50AM +0100, Uwe Kleine-König wrote:
Show 6 quoted lines
> but no Content-Transfer-Encoding:.  This yield a 7bit mail with 8bit
> characters.
> 
> I think we should add
> 
> 	Content-Transfer-Encoding: 8bit

Even though Brian's mail turned out to be hand-generated, this problem does exist in git-send-email. I don't know why I didn't add the encoding header in the first place, since it is clearly required.

Junio, I think this is maint-worthy.
 git-send-email.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index fd0a4ad..d7b8391 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -781,7 +781,8 @@ foreach my $t (@files) {
 			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';
 			}
 		}
 	}
-- 
1.5.3.6.1784.gd1b1d-dirty
Previous: Brian SwetlandNext: Uwe Kleine-König
Message 7 of 9 in “[BUG] encoding problem with format-patch + send-email”
  1. Uwe Kleine-KönigNov 15, 2007
  2. Jeff KingNov 16, 2007
  3. Uwe Kleine-KönigNov 16, 2007
  4. Junio C HamanoNov 17, 2007
  5. Uwe Kleine-KönigNov 19, 2007
  6. Brian SwetlandNov 19, 2007
  7. send-email: add transfer encoding header with content-typeJeff King, Nov 20, 2007
  8. Uwe Kleine-KönigNov 20, 2007
  9. Junio C HamanoNov 21, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.