From: Junio C Hamano Date: Fri, 26 May 2006 07:46:58 +0000 (-0700) Subject: mailinfo: More carefully parse header lines in read_one_header_line() X-Git-Tag: v1.4.0-rc1~49^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ef29c11702594e616cf43bea260515d9f14f17b0;hp=ef29c11702594e616cf43bea260515d9f14f17b0;p=git.git mailinfo: More carefully parse header lines in read_one_header_line() We exited prematurely from header parsing loop when the header field did not have a space after the colon but we insisted on it, and we got the check wrong because we forgot that we strip the trailing whitespace before we do the check. The space after the colon is not even required by RFC2822, so stop requiring it. While we are at it, the header line is specified to be more strict than "anything with a colon in it" (there must be one or more characters before the colon, and they must not be controls, SP or non US-ASCII), so implement that check as well, lest we mistakenly think something like: Bogus not a header line: this is not. as a header line. Signed-off-by: Junio C Hamano ---