]> git.ipfire.org Git - thirdparty/git.git/commitdiff
mailinfo: don't insert header prefix for handle_content_type()
authorRené Scharfe <l.s.r@web.de>
Mon, 10 Feb 2020 07:15:19 +0000 (08:15 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Feb 2020 17:27:13 +0000 (09:27 -0800)
handle_content_type() only cares about the value after "Content-Type: ";
there is no need to insert that string for it.

Suggested-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mailinfo.c

index 543962d40cdd028493674d92791bdead37342069..402ef04dd10cb955a4805f71745957aafdc5d657 100644 (file)
@@ -570,7 +570,6 @@ static int check_header(struct mailinfo *mi,
                len = strlen("Content-Type: ");
                strbuf_add(&sb, line->buf + len, line->len - len);
                decode_header(mi, &sb);
-               strbuf_insertstr(&sb, 0, "Content-Type: ");
                handle_content_type(mi, &sb);
                ret = 1;
                goto check_header_out;