|
|
|
@ -111,8 +111,7 @@ public class UrlProxyServlet extends ProxyServlet implements Servlet {
|
|
|
|
|
|
|
|
|
|
if ("CONNECT".equalsIgnoreCase(request.getMethod())) {
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
final Continuation continuation = ContinuationSupport.getContinuation(request);
|
|
|
|
|
|
|
|
|
|
if (!continuation.isInitial()) {
|
|
|
|
@ -222,7 +221,7 @@ public class UrlProxyServlet extends ProxyServlet implements Servlet {
|
|
|
|
|
String absurl = e.absUrl("href"); // get href attribut as abs url
|
|
|
|
|
if (absurl.startsWith("data:") || absurl.startsWith("#") || absurl.startsWith("mailto:") || absurl.startsWith("javascript:")) {
|
|
|
|
|
continue;
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
if (sb.getConfig("proxyURL.rewriteURLs", "all").equals("domainlist")) {
|
|
|
|
|
try {
|
|
|
|
|
if (sb.crawlStacker.urlInAcceptedDomain(new DigestURL(absurl)) != null) {
|
|
|
|
@ -236,7 +235,6 @@ public class UrlProxyServlet extends ProxyServlet implements Servlet {
|
|
|
|
|
e.attr("href", servletstub + absurl); // rewrite with abs proxy-url
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Element hd = doc.head();
|
|
|
|
|
if (hd != null) {
|
|
|
|
@ -287,7 +285,6 @@ public class UrlProxyServlet extends ProxyServlet implements Servlet {
|
|
|
|
|
FileUtils.copy(proxyout, response.getOutputStream());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String readLine(final InputStream in) throws IOException {
|
|
|
|
|
final ByteArrayOutputStream buf = new ByteArrayOutputStream();
|
|
|
|
|