aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-12 07:56:31 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-12 07:56:31 +0800
commit768ef5c60bd59daa227910c68f4b829db480d6ac (patch)
tree1f2a0d1de14e8c6f09898152438232a3b0a14336 /camel/camel-mime-utils.c
parent188ec0d0254b5f1e6fa1f98e70f5ad0990184490 (diff)
downloadgsoc2013-evolution-768ef5c60bd59daa227910c68f4b829db480d6ac.tar
gsoc2013-evolution-768ef5c60bd59daa227910c68f4b829db480d6ac.tar.gz
gsoc2013-evolution-768ef5c60bd59daa227910c68f4b829db480d6ac.tar.bz2
gsoc2013-evolution-768ef5c60bd59daa227910c68f4b829db480d6ac.tar.lz
gsoc2013-evolution-768ef5c60bd59daa227910c68f4b829db480d6ac.tar.xz
gsoc2013-evolution-768ef5c60bd59daa227910c68f4b829db480d6ac.tar.zst
gsoc2013-evolution-768ef5c60bd59daa227910c68f4b829db480d6ac.zip
New function to extract a meta-tag charset value if it exists.
2001-07-11 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part-utils.c (extract_metatag_charset): New function to extract a meta-tag charset value if it exists. (simple_data_wrapper_construct_from_parser): Along the same lines as the code I previously ripped out, but this time use the mime-parser's seek ability to help us along. Currently I read up to a 2k buffer size - this is probably overkill, 1k is probably plenty. * camel-mime-utils.c (html_meta_param_list_decode): When we get to an `=', we must skip past it before trying to grab the param value. duh. svn path=/trunk/; revision=11021
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index b87824e862..eb228cd748 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -1685,7 +1685,7 @@ header_decode_quoted_string(const char **in)
}
*outptr++ = c;
}
- *outptr = 0;
+ *outptr = '\0';
}
*in = inptr;
return out;
@@ -2723,6 +2723,7 @@ header_param_list_decode(const char *in)
struct _header_param *
html_meta_param_list_decode (const char *in, int inlen)
{
+ /* example: <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> */
struct _header_param *params = NULL, *last = NULL;
const char *inptr, *inend;
@@ -2753,6 +2754,7 @@ html_meta_param_list_decode (const char *in, int inlen)
break;
}
+ inptr++;
value = header_decode_value (&inptr);
header_decode_lwsp (&inptr);