commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mailutils branch, master, updated. release-3.0-35-g07be38a


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-3.0-35-g07be38a
Date: Fri, 9 Dec 2016 14:27:06 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=07be38a0eec5c9ea00a74a023bc3e8e98d98d715

The branch, master has been updated
       via  07be38a0eec5c9ea00a74a023bc3e8e98d98d715 (commit)
      from  819739696b8b087d311655b639db7b14fef48f02 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 07be38a0eec5c9ea00a74a023bc3e8e98d98d715
Author: Sergey Poznyakoff <address@hidden>
Date:   Fri Dec 9 16:25:20 2016 +0200

    Fix minor inconsistencies

-----------------------------------------------------------------------

Summary of changes:
 imap4d/fetch.c              |    2 +-
 libmailutils/base/ctparse.c |   33 ++++++++++++++++++++++++---------
 2 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/imap4d/fetch.c b/imap4d/fetch.c
index 3c35f84..ac3fa71 100644
--- a/imap4d/fetch.c
+++ b/imap4d/fetch.c
@@ -335,7 +335,7 @@ get_content_type (mu_header_t hdr, mu_content_type_t *ctp, 
char const *dfl)
   int rc;
   char *buffer = NULL;
   
-  rc = mu_header_aget_value (hdr, MU_HEADER_CONTENT_TYPE, &buffer);
+  rc = mu_header_aget_value_unfold (hdr, MU_HEADER_CONTENT_TYPE, &buffer);
   if (rc == 0)
     {
       rc = mu_content_type_parse (buffer, ctp);
diff --git a/libmailutils/base/ctparse.c b/libmailutils/base/ctparse.c
index 5262847..6ccac5c 100644
--- a/libmailutils/base/ctparse.c
+++ b/libmailutils/base/ctparse.c
@@ -1,3 +1,19 @@
+/* Content-Type (RFC 2045) parser for GNU Mailutils
+   Copyright (C) 2016 Free Software Foundation, Inc.
+
+   GNU Mailutils is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   GNU Mailutils is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
+
 #if HAVE_CONFIG_H
 # include <config.h>
 #endif
@@ -53,6 +69,10 @@ parse_type (const char *input, mu_content_type_t ct)
   return parse_subtype (input + i + 1, ct);
 }
 
+static char tspecials[] = "()<>@,;:\\\"/[]?=";
+
+#define ISTOKEN(c) ((unsigned char)(c) > ' ' && !strchr (tspecials, c))
+
 static int
 parse_subtype (const char *input, mu_content_type_t ct)
 {
@@ -60,8 +80,7 @@ parse_subtype (const char *input, mu_content_type_t ct)
 
   for (i = 0; !(input[i] == 0 || input[i] == ';'); i++)
     {
-      if (input[i] == 0
-         || !(mu_isalnum (input[i]) || input[i] == '-' || input[i] == '_'))
+      if (!ISTOKEN (input[i]))
        return MU_ERR_PARSE;
     }
   ct->subtype = malloc (i);
@@ -86,7 +105,7 @@ parse_params (const char *input, mu_content_type_t ct)
   
   while (*input == ';')
     {
-      input = mu_str_skip_class (input + 1, MU_CTYPE_BLANK);
+      input = mu_str_skip_class (input + 1, MU_CTYPE_SPACE);
       rc = parse_param (&input, ct);
       if (rc)
        return rc;
@@ -94,7 +113,7 @@ parse_params (const char *input, mu_content_type_t ct)
 
   if (*input)
     {
-      input = mu_str_skip_class (input, MU_CTYPE_BLANK);
+      input = mu_str_skip_class (input, MU_CTYPE_SPACE);
       ct->trailer = strdup (input);
       if (!ct->trailer)
        return ENOMEM;
@@ -103,10 +122,6 @@ parse_params (const char *input, mu_content_type_t ct)
   return rc;
 }
 
-static char tspecials[] = "()<>@,;:\\\"/[]?=";
-
-#define ISTOKEN(c) ((unsigned char)(c) > ' ' && !strchr (tspecials, c))
-
 static int
 parse_param (const char **input_ptr, mu_content_type_t ct)
 {
@@ -205,7 +220,7 @@ mu_content_type_parse (const char *input, mu_content_type_t 
*retct)
   if (!ct)
     return errno;
 
-  rc = parse_type (mu_str_skip_class (input, MU_CTYPE_BLANK), ct);
+  rc = parse_type (mu_str_skip_class (input, MU_CTYPE_SPACE), ct);
   if (rc)
     mu_content_type_destroy (&ct);
   else


hooks/post-receive
-- 
GNU Mailutils



reply via email to

[Prev in Thread] Current Thread [Next in Thread]