aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-08-01 00:04:35 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-08-01 00:04:35 +0200
commit2aaa3cecd8a21c975c5bea886c678775627e90e7 (patch)
treec11aa2856651a3cbb6dc5dba32dd0eafda691bf8
parent0f9d98a4f4ef328ce31915fd56092b4f3cc185a9 (diff)
downloadmblaze-2aaa3cecd8a21c975c5bea886c678775627e90e7.tar.gz
blaze822: blaze822_chdr: downcase header
-rw-r--r--blaze822.c4
-rw-r--r--mshow.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/blaze822.c b/blaze822.c
index 3bdcbd9..84d56b4 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -436,7 +436,11 @@ char *
blaze822_chdr(struct message *mesg, const char *chdr)
{
char hdr[256];
+ char *c;
+
size_t l = snprintf(hdr, sizeof hdr, "%c%s:", 0, chdr);
+ for (c = hdr+1; *c; c++)
+ *c = lc(*c);
return blaze822_hdr_(mesg, hdr, l);
}
diff --git a/mshow.c b/mshow.c
index 3b592b6..5435938 100644
--- a/mshow.c
+++ b/mshow.c
@@ -683,7 +683,7 @@ show(char *file)
*n = 0;
v = blaze822_chdr(msg, h);
if (v) {
- if (strcmp("date", h) == 0)
+ if (strcasecmp("date", h) == 0)
print_date_header(v);
else
print_decode_header(h, v);