2011-08-29 [colin] 3.7.10cvs4
authorColin Leroy <colin@colino.net>
Mon, 29 Aug 2011 08:13:32 +0000 (08:13 +0000)
committerColin Leroy <colin@colino.net>
Mon, 29 Aug 2011 08:13:32 +0000 (08:13 +0000)
* src/compose.c
Don't insert custom headers that have empty values.
Allows not inserting X-Mailer if it's set to nothing.
Fixes bug #2471, "Make setting an X-Mailer header optional".

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index d315837..d253065 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-29 [colin]     3.7.10cvs4
+
+       * src/compose.c
+               Don't insert custom headers that have empty values.
+               Allows not inserting X-Mailer if it's set to nothing.
+               Fixes bug #2471, "Make setting an X-Mailer header optional".
+
 2011-08-29 [colin]     3.7.10cvs3
 
        * src/image_viewer.c
index af5deef..509da65 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.53.2.37 -r 1.53.2.38 po/POTFILES.in;  cvs diff -u -r 1.4.2.38 -r 1.4.2.39 src/common/ssl_certificate.c;  cvs diff -u -r 1.1.4.114 -r 1.1.4.115 src/etpan/imap-thread.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/etpan/nntp-thread.c;  ) > 3.7.10cvs1.patchset
 ( cvs diff -u -r 1.204.2.201 -r 1.204.2.202 src/prefs_common.c;  cvs diff -u -r 1.103.2.132 -r 1.103.2.133 src/prefs_common.h;  cvs diff -u -r 1.395.2.429 -r 1.395.2.430 src/summaryview.c;  ) > 3.7.10cvs2.patchset
 ( cvs diff -u -r 1.1.2.29 -r 1.1.2.30 src/image_viewer.c;  cvs diff -u -r 1.96.2.231 -r 1.96.2.232 src/textview.c;  cvs diff -u -r 1.5.2.94 -r 1.5.2.95 src/gtk/gtkutils.c;  cvs diff -u -r 1.4.2.56 -r 1.4.2.57 src/gtk/gtkutils.h;  ) > 3.7.10cvs3.patchset
+( cvs diff -u -r 1.382.2.578 -r 1.382.2.579 src/compose.c;  ) > 3.7.10cvs4.patchset
index 47f43fe..5af304c 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=3
+EXTRA_VERSION=4
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index e8ace86..099ac1f 100644 (file)
@@ -6254,10 +6254,12 @@ static gchar *compose_get_header(Compose *compose)
                     cur = cur->next) {
                        CustomHeader *chdr = (CustomHeader *)cur->data;
 
-                       if (custom_header_is_allowed(chdr->name)) {
+                       if (custom_header_is_allowed(chdr->name)
+                           && chdr->value != NULL
+                           && *(chdr->value) != '\0') {
                                compose_convert_header
                                        (compose, buf, sizeof(buf),
-                                        chdr->value ? chdr->value : "",
+                                        chdr->value,
                                         strlen(chdr->name) + 2, FALSE);
                                g_string_append_printf(header, "%s: %s\n", chdr->name, buf);
                        }