[libgdata] youtube: Temporarily relax requirements on <feed/title> element



commit faa7fe461032a3cb6b7a35fc6465bed53c695b70
Author: Philip Withnall <philip tecnocode co uk>
Date:   Tue Jul 3 22:16:59 2012 +0100

    youtube: Temporarily relax requirements on <feed/title> element
    
    The YouTube comments feed is not a valid Atom feed, as itâs recently (somehow)
    lost its <title> element. So we temporarily relax our requirements for feeds
    to follow any kind of standards or even the Google-provided documentation.
    
    Filed as: https://code.google.com/p/gdata-issues/issues/detail?id=2908
    
    Helps: https://bugzilla.gnome.org/show_bug.cgi?id=679072

 gdata/gdata-feed.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gdata/gdata-feed.c b/gdata/gdata-feed.c
index fd9b845..0e51269 100644
--- a/gdata/gdata-feed.c
+++ b/gdata/gdata-feed.c
@@ -532,8 +532,12 @@ post_parse_xml (GDataParsable *parsable, gpointer user_data, GError **error)
 	GDataFeedPrivate *priv = GDATA_FEED (parsable)->priv;
 
 	/* Check for missing required elements */
-	if (priv->title == NULL)
-		return gdata_parser_error_required_element_missing ("title", "feed", error);
+	/* FIXME: The YouTube comments feed seems to have lost its <feed/title> element, making it an invalid Atom feed and meaning
+	 * the check below has to be commented out.
+	 * Filed as: https://code.google.com/p/gdata-issues/issues/detail?id=2908.
+	 * Discovered in: https://bugzilla.gnome.org/show_bug.cgi?id=679072#c12. */
+	/*if (priv->title == NULL)
+		return gdata_parser_error_required_element_missing ("title", "feed", error);*/
 	if (priv->id == NULL)
 		return gdata_parser_error_required_element_missing ("id", "feed", error);
 	if (priv->updated == -1)



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