Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove debugging strings from test output #204

Merged
merged 1 commit into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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