[evolution-data-server] Skip leading whitespace in mime_part_get_header().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Skip leading whitespace in mime_part_get_header().
- Date: Tue, 12 Oct 2010 18:57:13 +0000 (UTC)
commit ef24183c4c53d8861476fe143a1b034e901272e0
Author: Matthew Barnes <mbarnes redhat com>
Date: Mon Oct 11 14:19:18 2010 -0400
Skip leading whitespace in mime_part_get_header().
Return value points to first non-whitespace character in header value.
camel/camel-mime-part.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index dca5ff1..5267175 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -459,8 +459,15 @@ mime_part_get_header (CamelMedium *medium,
const gchar *name)
{
CamelMimePart *part = (CamelMimePart *)medium;
+ const gchar *value;
- return camel_header_raw_find (&part->headers, name, NULL);
+ value = camel_header_raw_find (&part->headers, name, NULL);
+
+ /* Skip leading whitespace. */
+ while (value != NULL && g_ascii_isspace (*value))
+ value++;
+
+ return value;
}
static GArray *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]