Skip to content

Commit

Permalink
Remove debugging strings from test output (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo authored and michael-o committed Jul 28, 2024
1 parent 54faaa8 commit eb0b0f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.eclipse.jetty.proxy.AsyncProxyServlet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author Olivier Lamy
Expand All @@ -42,8 +40,6 @@ public class AuthAsyncProxyServlet extends AsyncProxyServlet {

private long sleepTime = 0;

private Logger log = LoggerFactory.getLogger(getClass());

List<HttpRequest> httpRequests = new ArrayList<>();

private File siteTargetPath;
Expand Down Expand Up @@ -81,12 +77,11 @@ public AuthAsyncProxyServlet(Map<String, String> authentications, long sleepTime
}

/** {@inheritDoc} */
@Override
public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
final HttpServletRequest request = (HttpServletRequest) req;
final HttpServletResponse response = (HttpServletResponse) res;

log.info("handle ");

if (this.authentications != null && !this.authentications.isEmpty()) {
String proxyAuthorization = request.getHeader("Proxy-Authorization");
if (proxyAuthorization != null && proxyAuthorization.startsWith("Basic ")) {
Expand Down Expand Up @@ -126,7 +121,6 @@ public void service(ServletRequest req, ServletResponse res) throws ServletExcep

if (request.getMethod().equalsIgnoreCase("PUT") && targetPath != null) {
File targetFile = new File(siteTargetPath, targetPath);
log.info("writing file " + targetFile.getPath());
FileUtils.writeByteArrayToFile(targetFile, IOUtils.toByteArray(request.getInputStream()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
import org.eclipse.jetty.server.handler.AbstractHandler;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author Olivier Lamy
Expand All @@ -47,8 +45,6 @@
*/
public class SimpleDavServerHandler {

private Logger log = LoggerFactory.getLogger(getClass());

private Server server;

private File siteTargetPath;
Expand All @@ -58,6 +54,7 @@ public class SimpleDavServerHandler {
public SimpleDavServerHandler(final File targetPath) throws Exception {
this.siteTargetPath = targetPath;
Handler repoHandler = new AbstractHandler() {
@Override
public void handle(String target, Request r, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
String targetPath = request.getPathInfo();
Expand All @@ -77,7 +74,6 @@ public void handle(String target, Request r, HttpServletRequest request, HttpSer

if (request.getMethod().equalsIgnoreCase("PUT")) {
File targetFile = new File(siteTargetPath, targetPath);
log.info("writing file " + targetFile.getPath());
FileUtils.writeByteArrayToFile(targetFile, IOUtils.toByteArray(request.getInputStream()));
}

Expand Down

0 comments on commit eb0b0f6

Please sign in to comment.