diff options
Diffstat (limited to 'rfc2045/rfc2045.c')
| -rw-r--r-- | rfc2045/rfc2045.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/rfc2045/rfc2045.c b/rfc2045/rfc2045.c index 40c2017..4e62e39 100644 --- a/rfc2045/rfc2045.c +++ b/rfc2045/rfc2045.c @@ -1,5 +1,5 @@ /* -** Copyright 1998 - 2004 Double Precision, Inc. See COPYING for +** Copyright 1998 - 2018 Double Precision, Inc. See COPYING for ** distribution information. */ @@ -621,7 +621,7 @@ int bit8=0; */ if (p->content_type && - strcmp(p->content_type, "message/rfc822") == 0) + rfc2045_message_content_type(p->content_type)) { newp=append_part_noinherit(p, p->startbody); newp->workinheader=1; @@ -737,6 +737,36 @@ char *p; return (p); } +/* +** Whether this MIME content type is a nested MIME message. +*/ + +int rfc2045_message_content_type(const char *content_type) +{ + return strcmp(content_type, RFC2045_MIME_MESSAGE_RFC822) == 0 || + strcmp(content_type, RFC2045_MIME_MESSAGE_GLOBAL) == 0; +} + +/* +** Whether this MIME content type is a delivery status notification. +*/ + +int rfc2045_delivery_status_content_type(const char *content_type) +{ + return strcmp(content_type, + RFC2045_MIME_MESSAGE_DELIVERY_STATUS) == 0 || + strcmp(content_type, + RFC2045_MIME_MESSAGE_GLOBAL_DELIVERY_STATUS) == 0; +} + +int rfc2045_message_headers_content_type(const char *content_type) +{ + return strcmp(content_type, + RFC2045_MIME_MESSAGE_HEADERS) == 0 || + strcmp(content_type, + RFC2045_MIME_MESSAGE_GLOBAL_HEADERS) == 0; +} + /* Various permutations of the above, including forcing the string to ** lowercase */ |
