diff options
Diffstat (limited to 'camel/camel-url.c')
-rw-r--r-- | camel/camel-url.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/camel/camel-url.c b/camel/camel-url.c index 7033913ea0..4e3e600981 100644 --- a/camel/camel-url.c +++ b/camel/camel-url.c @@ -37,6 +37,7 @@ #include "camel-mime-utils.h" #include "camel-object.h" #include "camel-string-utils.h" +#include "camel-i18n.h" static void copy_param (GQuark key_id, gpointer data, gpointer user_data); static void output_param (GQuark key_id, gpointer data, gpointer user_data); @@ -428,7 +429,10 @@ camel_url_set_port (CamelURL *url, int port) void camel_url_set_param (CamelURL *url, const char *name, const char *value) { - g_datalist_set_data_full (&url->params, name, value ? g_strdup (value) : NULL, g_free); + if (value) + g_datalist_set_data_full (&url->params, name, g_strdup(value), g_free); + else + g_datalist_remove_data(&url->params, name); } const char * |