@matheusbsbs / matheus-bagliano / commits / 517b60564e
Fork 0

mailinfo: don't insert header prefix for handle_content_type()

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>

René Scharfe committed Feb 10, 2020 at 08:15 UTC 517b60564e2c69cbb79895e04b24a6393273398f
1 file changed -1
mailinfo.c
-1
@@ -570,7 +570,6 @@ static int check_header(struct mailinfo *mi,
570 len = strlen("Content-Type: ");
571 strbuf_add(&sb, line->buf + len, line->len - len);
572 decode_header(mi, &sb);
573 - strbuf_insertstr(&sb, 0, "Content-Type: ");
573 handle_content_type(mi, &sb);
574 ret = 1;
575 goto check_header_out;