about summary refs log tree commit diff
path: root/mshow.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-26 17:00:15 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-26 17:00:15 +0200
commit93842048c69fb9bf012b35b08770587960ca9b61 (patch)
treef387bedef867af0b98f72c79cc6ff7937faef42d /mshow.c
parent2b81707c51f2ae26db5129d15741fe89a3b781d2 (diff)
downloadmblaze-93842048c69fb9bf012b35b08770587960ca9b61.tar.gz
mblaze-93842048c69fb9bf012b35b08770587960ca9b61.tar.xz
mblaze-93842048c69fb9bf012b35b08770587960ca9b61.zip
mshow: decode headers of message/rfc822 parts
Diffstat (limited to 'mshow.c')
-rw-r--r--mshow.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mshow.c b/mshow.c
index 7d50965..62f2b94 100644
--- a/mshow.c
+++ b/mshow.c
@@ -211,11 +211,12 @@ nofilter:
 		} else if (strncmp(ct, "message/rfc822", 14) == 0) {
 			struct message *imsg = blaze822_mem(body, bodylen);
 			char *h = 0;
-			if (imsg) {
-				while ((h = blaze822_next_header(imsg, h)))
-					printf("%s\n", h);
-				printf("\n");
+			while (imsg && (h = blaze822_next_header(imsg, h))) {
+				char d[4096];
+				blaze822_decode_rfc2047(d, h, sizeof d, "UTF-8");
+				printhdr(d);
 			}
+			printf("\n");
 		} else if (strncmp(ct, "multipart/", 10) == 0) {
 			;
 		} else {