Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

more fixes to the yacysearch.rss, it's now 100% valid according to http://feedvalidator.org - RFC-822 date time had to include the time instead of date only - <opensearch:link> doesn't exist -> <atom:link>, see http://www.opensearch.org/Specifications/OpenSearch/1.1 - <link> elements are mandatory for <channel> and <item>

fuchsi03c5b4ad68f9
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index e5d7ab202..6b8b2ab23 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -381,6 +381,7 @@ public class yacysearch {
// adding some additional properties needed for the rss feed
String hostName = (String) header.get("Host", "localhost");
if (hostName.indexOf(":") == -1) hostName += ":" + serverCore.getPortNr(env.getConfig("port", "8080"));
+ prop.put("searchBaseURL", "http://" + hostName + "/yacysearch.html");
prop.put("rssYacyImageURL", "http://" + hostName + "/env/grafics/yacy.gif");
}
diff --git a/htroot/yacysearch.rss b/htroot/yacysearch.rss
index c5b4960f8..1334a0336 100644
--- a/htroot/yacysearch.rss
+++ b/htroot/yacysearch.rss
@@ -2,19 +2,22 @@
<?xml-stylesheet type='text/xsl' href='/yacysearch.xsl' version='1.0'?>
<rss version="2.0"
xmlns:yacyTopwords="http://www.yacy.net/yacy/topwords"
- xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
+ xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
+ xmlns:atom="http://www.w3.org/2005/Atom">
<!-- YaCy P2P Web Search - Results; http://yacy.net -->
<channel>
<title>YaCy P2P-Search for #[former]#</title>
<description>Search for #[former]#</description>
+ <link>#[searchBaseURL]#?search=#[former]#&amp;resource=#[input_resource]#&amp;contentdom=#[input_contentdom]#</link>
<image>
<url>#[rssYacyImageURL]#</url>
<title>Search for #[former]#</title>
+ <link>#[searchBaseURL]#?search=#[former]#&amp;resource=#[input_resource]#&amp;contentdom=#[input_contentdom]#</link>
</image>
<opensearch:totalResults>#[num-results_totalcount]#</opensearch:totalResults>
<opensearch:startIndex>#[num-results_offset]#</opensearch:startIndex>
<opensearch:itemsPerPage>#[num-results_itemsPerPage]#</opensearch:itemsPerPage>
- <opensearch:link rel="search" href="opensearchdescription.xml" type="application/opensearchdescription+xml"/>
+ <atom:link rel="related" href="opensearchdescription.xml" type="application/opensearchdescription+xml"/>
<opensearch:Query role="request" searchTerms="#[former]#" />
#{results}#
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 2d1ae8bcf..4c0f6cd3b 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -2897,7 +2897,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
}
// we need locale independent RFC-822 dates at some places
- private static SimpleDateFormat DateFormatter822 = new SimpleDateFormat("EEE, dd MMM yyyy", Locale.US);
+ private static SimpleDateFormat DateFormatter822 = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.US);
public static String dateString822(Date date) {
if (date == null) return ""; else return DateFormatter822.format(date);
}