diff --git a/mshow.c b/mshow.c index 8d4ae24..dc890fa 100644 --- a/mshow.c +++ b/mshow.c @@ -28,6 +28,8 @@ static char *hflag = defaulthflags; static char *xflag; static char *Oflag; +static char fallback_ct[] = "text/plain"; + struct message *filters; static int mimecount; @@ -181,7 +183,7 @@ render_mime(int depth, struct message *msg, char *body, size_t bodylen) { char *ct = blaze822_hdr(msg, "content-type"); if (!ct) - ct = "text/x-unknown"; + ct = fallback_ct; char *mt = mimetype(ct); char *tlmt = tlmimetype(ct); char *filename = mime_filename(msg); @@ -309,7 +311,7 @@ choose_alternative(struct message *msg, int depth) m++; char *ict = blaze822_hdr(imsg, "content-type"); if (!ict) - ict = "text/x-unknown"; + ict = fallback_ct; char *imt = mimetype(ict); char *s = strstr(Aflag, imt); @@ -366,7 +368,7 @@ list_mime(int depth, struct message *msg, char *body, size_t bodylen) char *ct = blaze822_hdr(msg, "content-type"); if (!ct) - ct = "text/x-unknown"; + ct = fallback_ct; char *mt = mimetype(ct); char *filename = mime_filename(msg);