From: David Levine Date: Thu, 7 Feb 2013 02:31:18 +0000 (-0600) Subject: Added global variable skip_mp_cte_check to turn off that check X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/fc8a48c33835906623cb10ee129fc70a72271e02?ds=sidebyside;hp=102b7de56d30dfa217b4f4bc58328b5bc96e7675 Added global variable skip_mp_cte_check to turn off that check for incorrect encoding of multipart messages in InitMultiPart(). --- diff --git a/uip/mhparse.c b/uip/mhparse.c index c09cb1ac..c9574efd 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -36,6 +36,12 @@ int checksw = 0; /* check Content-MD5 field */ */ char *tmp; +/* + * Instruct parser not to detect invalid Content-Transfer-Encoding + * in a multipart. + */ +int skip_mp_cte_check; + /* * Structures for TEXT messages */ @@ -1111,8 +1117,8 @@ InitMultiPart (CT ct) * The encoding for multipart messages must be either * 7bit, 8bit, or binary (per RFC2045). */ - if (ct->c_encoding != CE_7BIT && ct->c_encoding != CE_8BIT - && ct->c_encoding != CE_BINARY) { + if (! skip_mp_cte_check && ct->c_encoding != CE_7BIT && + ct->c_encoding != CE_8BIT && ct->c_encoding != CE_BINARY) { /* Copy the Content-Transfer-Encoding header field body so we can remove any trailing whitespace and leading blanks from it. */ char *cte = add (ct->c_celine ? ct->c_celine : "(null)", NULL);