Skip to content

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

adding a hint to javascript browser short cut on Url-Proxy page (AugmentedBrowsing_p.html)

regere11504309fb7
diff --git a/htroot/AugmentedBrowsing_p.html b/htroot/AugmentedBrowsing_p.html
index e46d7f1eb..32efd617b 100644
--- a/htroot/AugmentedBrowsing_p.html
+++ b/htroot/AugmentedBrowsing_p.html
@@ -32,6 +32,12 @@
<p class="help">
Enables or disables URL proxy for all search results. If enabled, all search results will be tunneled through URL proxy.
</p>
+ <p class="help">Alternatively you may add this javascript to your browser favorites/short-cuts, which will reload the current browser address
+ via the YaCy proxy servlet.<br />
+
+ <code>javascript: window.location.href = ('http://localhost:8090/proxy.html?url=' + location.href);</code>
+ or right-click this link and add to favorites: <code><a class="link" href="javascript: window.location.href = ('http://localhost:8090/proxy.html?url=' + location.href);">YaCy proxy start</a></code>
+ </p>
</dd>
<dt>Restrict URL proxy use:</dt>
diff --git a/source/net/yacy/http/servlets/UrlProxyServlet.java b/source/net/yacy/http/servlets/UrlProxyServlet.java
index bc509963d..586b5b004 100644
--- a/source/net/yacy/http/servlets/UrlProxyServlet.java
+++ b/source/net/yacy/http/servlets/UrlProxyServlet.java
@@ -71,7 +71,7 @@ import org.jsoup.select.Elements;
*
* Hint: a browser favorite of
* javascript: window.location.href = ('http://localhost:9090/proxy.html?url=' + location.href);
- * will start the urlproxy with the current broser address.
+ * will start the urlproxy with the current browser address.
*/
public class UrlProxyServlet extends ProxyServlet implements Servlet {
@@ -267,7 +267,7 @@ public class UrlProxyServlet extends ProxyServlet implements Servlet {
}
response.setIntHeader(HeaderFramework.CONTENT_LENGTH, sbb.length);
- FileUtils.copy (sbb,response.getOutputStream());
+ response.getOutputStream().write(sbb);
} else {
if ((response.getHeader(HeaderFramework.CONTENT_LENGTH) == null) && prop.containsKey(HeaderFramework.CONNECTION_PROP_PROXY_RESPOND_SIZE)) {