summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f8128cf)
raw | patch | inline | side by side (parent: f8128cf)
author | Eric W. Biederman <ebiederm@xmission.com> | |
Tue, 23 May 2006 19:45:37 +0000 (13:45 -0600) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 23 May 2006 21:01:59 +0000 (14:01 -0700) |
B and Q decoding is not appropriate for in body headers, so move
it up to where we explicitly know we have a real email header.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
it up to where we explicitly know we have a real email header.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
mailinfo.c | patch | blob | history |
diff --git a/mailinfo.c b/mailinfo.c
index 83a2986e7edc7e7db8878eaafe5a285e3a66e78c..bee7b202cfc5d8c1a2b7e642cf62539973ea514d 100644 (file)
--- a/mailinfo.c
+++ b/mailinfo.c
}
}
+static void decode_header_bq(char *it);
typedef int (*header_fn_t)(char *);
struct header_def {
const char *name;
int len = header[i].namelen;
if (!strncasecmp(line, header[i].name, len) &&
line[len] == ':' && isspace(line[len + 1])) {
+ /* Unwrap inline B and Q encoding, and optionally
+ * normalize the meta information to utf8.
+ */
+ decode_header_bq(line + len + 2);
header[i].func(line + len + 2);
break;
}
cleanup_space(email);
cleanup_space(sub);
- /* Unwrap inline B and Q encoding, and optionally
- * normalize the meta information to utf8.
- */
- decode_header_bq(name);
- decode_header_bq(date);
- decode_header_bq(email);
- decode_header_bq(sub);
printf("Author: %s\nEmail: %s\nSubject: %s\nDate: %s\n\n",
name, email, sub, date);
}