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

pull/1/head
reger 11 years ago
parent b12200cafe
commit e11504309f

@ -32,6 +32,12 @@
<p class="help"> <p class="help">
Enables or disables URL proxy for all search results. If enabled, all search results will be tunneled through URL proxy. Enables or disables URL proxy for all search results. If enabled, all search results will be tunneled through URL proxy.
</p> </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> </dd>
<dt>Restrict URL proxy use:</dt> <dt>Restrict URL proxy use:</dt>

@ -71,7 +71,7 @@ import org.jsoup.select.Elements;
* *
* Hint: a browser favorite of * Hint: a browser favorite of
* javascript: window.location.href = ('http://localhost:9090/proxy.html?url=' + location.href); * 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 { 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); response.setIntHeader(HeaderFramework.CONTENT_LENGTH, sbb.length);
FileUtils.copy (sbb,response.getOutputStream()); response.getOutputStream().write(sbb);
} else { } else {
if ((response.getHeader(HeaderFramework.CONTENT_LENGTH) == null) && prop.containsKey(HeaderFramework.CONNECTION_PROP_PROXY_RESPOND_SIZE)) { if ((response.getHeader(HeaderFramework.CONTENT_LENGTH) == null) && prop.containsKey(HeaderFramework.CONNECTION_PROP_PROXY_RESPOND_SIZE)) {

Loading…
Cancel
Save