move unnecessary nested else out of condition

pull/1/head
orbiter 11 years ago
parent 0d8072aa99
commit c9f66be20b

@ -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();

@ -81,8 +81,7 @@ public class YaCyProxyServlet extends ProxyServlet implements Servlet {
if ("CONNECT".equalsIgnoreCase(request.getMethod())) {
return;
} else {
}
final Continuation continuation = ContinuationSupport.getContinuation(request);
if (!continuation.isInitial()) {
@ -283,7 +282,6 @@ public class YaCyProxyServlet extends ProxyServlet implements Servlet {
FileUtils.copy(proxyout, response.getOutputStream());
}
}
}
private String readLine(final InputStream in) throws IOException {
final ByteArrayOutputStream buf = new ByteArrayOutputStream();

Loading…
Cancel
Save