Skip to content

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

changed link to opensearchdescription document to a absolute uri (in yacysearch.html and yacysearch.rss) see http://www.opensearch.org/Specifications/OpenSearch/1.1/Draft_5#The_.22Description.22_element

regerea932f841cf0
diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html
index 8627f55fe..ade1b8ed6 100644
--- a/htroot/yacysearch.html
+++ b/htroot/yacysearch.html
@@ -4,7 +4,7 @@
<title>#[former]# - YaCy '#[clientname]#': Search Page</title>
#%env/templates/metas.template%#
<link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="yacysearch.rss?query=#[former]#" />
- <link rel="search" type="application/opensearchdescription+xml" title="YaCy Search on '#[clientname]#'" href="opensearchdescription.xml" />
+ <link rel="search" type="application/opensearchdescription+xml" title="YaCy Search on '#[clientname]#'" href="http://#[thisaddress]#/opensearchdescription.xml" />
<link rel="stylesheet" type="text/css" media="screen" href="/env/highslide.css" />
<script type="text/javascript" src="/js/ajax.js"></script>
<script type="text/javascript" src="/js/xml.js"></script>
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index 7635a3f45..2e11aeb2d 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -1063,9 +1063,10 @@ public class yacysearch {
String hostName = header.get("Host", "localhost");
if ( hostName.indexOf(':', 0) == -1 ) {
hostName += ":" + serverCore.getPortNr(env.getConfig("port", "8090"));
- }
+ }
prop.put("searchBaseURL", "http://" + hostName + "/yacysearch.html");
prop.put("rssYacyImageURL", "http://" + hostName + "/env/grafics/yacy.gif");
+ prop.put("thisaddress", hostName);
}
prop.put("searchagain", global ? "1" : "0");
diff --git a/htroot/yacysearch.rss b/htroot/yacysearch.rss
index 6c3ba5147..91ec690a0 100644
--- a/htroot/yacysearch.rss
+++ b/htroot/yacysearch.rss
@@ -21,7 +21,7 @@
<opensearch:totalResults>#[num-results_totalcount]#</opensearch:totalResults>
<opensearch:startIndex>#[num-results_offset]#</opensearch:startIndex>
<opensearch:itemsPerPage>#[num-results_itemsPerPage]#</opensearch:itemsPerPage>
- <atom:link rel="related" href="opensearchdescription.xml" type="application/opensearchdescription+xml"/>
+ <atom:link rel="search" href="http://#[thisaddress]#/opensearchdescription.xml" type="application/opensearchdescription+xml"/>
<opensearch:Query role="request" searchTerms="#[rss_queryenc]#" />
#{results}#
<!--#include virtual="yacysearchitem.xml?item=#[item]#&eventID=#[eventID]#" -->