]> source.dussan.org Git - rspamd.git/commitdiff
* Assume 7bit as default transfer encoding
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 16 Jul 2010 16:20:26 +0000 (20:20 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 16 Jul 2010 16:20:26 +0000 (20:20 +0400)
src/expressions.c

index 14ac3d98f719fdb7b6bde327b3e4b2c2c47fe27b..b377fa0baa6fb1c96a6861e82dd60dc4014ae685 100644 (file)
@@ -1595,10 +1595,18 @@ rspamd_compare_transfer_encoding (struct worker_task * task, GList * args, void
                if (GMIME_IS_PART (part)) {
 #ifndef GMIME24
                        part_enc = g_mime_part_get_encoding (GMIME_PART (part));
+                       if (part_enc == GMIME_PART_ENCODING_DEFAULT) {
+                               /* Assume 7bit as default transfer encoding */
+                               part_enc = GMIME_PART_ENCODING_7BIT;
+                       }
 #else
                        part_enc = g_mime_part_get_content_encoding (GMIME_PART (part));
+                       if (part_enc == GMIME_CONTENT_ENCODING_DEFAULT) {
+                               /* Assume 7bit as default transfer encoding */
+                               part_enc = GMIME_CONTENT_ENCODING_7BIT;
+                       }
 #endif
-                       
+
 
                        debug_task ("got encoding in part: %d and compare with %d", (int)part_enc, (int)enc_req);
 #ifndef GMIME24