[evolution-rss] Bug 652466 - 'Illegal content type' error for ATOM feeds
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss] Bug 652466 - 'Illegal content type' error for ATOM feeds
- Date: Wed, 15 Jun 2011 20:32:34 +0000 (UTC)
commit c434d1b8145abcbef9564591c59ec0c5cb6b0945
Author: Lucian Langa <lucilanga gnome org>
Date: Mon Jun 13 18:29:28 2011 +0300
Bug 652466 - 'Illegal content type' error for ATOM feeds
src/parser.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/parser.c b/src/parser.c
index ce9c0ba..a63d52f 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -175,12 +175,16 @@ xml_parse_sux (const char *buf, int len)
xmlParserCtxtPtr ctxt;
xmlDoc *doc = NULL;
gchar *mime_type;
+ gboolean uncertain;
rsserror = FALSE;
g_return_val_if_fail (buf != NULL, NULL);
- mime_type = g_content_type_guess(NULL, (guchar *)buf, len, NULL);
- g_print("mime:%s\n", mime_type);
+ /* we might be forced to lower detection buffer size as
+ * application/ is often misdetected as text/html
+ */
+ mime_type = g_content_type_guess(NULL, (guchar *)buf, 100, &uncertain);
+ dp("mime:%s, uncertain:%d\n", mime_type, uncertain);
//feeding parsed anything other than xml results in blocking delays
//it's possible we can relax parser by using xmlErrorFunc
//UPDATE: add text/* - but exclude text/html I've seen huge delays because of this
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]