[evolution-rss/evolution-rss-0-2-0] Bug 641237 - Importing RDF feed fails



commit 8a7a366fb8ea2237477884d80e2f34edf9b7f7b6
Author: Lucian Langa <lucilanga gnome org>
Date:   Wed Feb 2 21:27:31 2011 +0200

    Bug 641237 - Importing RDF feed fails

 src/parser.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/parser.c b/src/parser.c
index 1ebb4c9..b2f4beb 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -175,7 +175,11 @@ xml_parse_sux (const char *buf, int len)
 	mime_type = g_content_type_guess(NULL, (guchar *)buf, len, NULL);
 	//feeding parsed anything other than xml results in blocking delays
 	//it's possible we can relax parser by using xmlErrorFunc
-	if (!g_ascii_strncasecmp (mime_type, "application/", 12)) {
+	//UPDATE: add text/* - but exclude text/html I've seen huge delays because of this
+	//I doubt there'll be any text/html feeds
+	if (!g_ascii_strncasecmp (mime_type, "application/", 12)
+	   || (!g_ascii_strncasecmp (mime_type, "text/", 5)
+	   && g_ascii_strncasecmp (mime_type, "text/html", 9))) {
 		if (!sax) {
 			xmlInitParser();
 			sax = xmlMalloc (sizeof (xmlSAXHandler));



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