From f5adf51f59628c210d6bc8838df99d9b64002ee5 Mon Sep 17 00:00:00 2001 From: ulrich Date: Fri, 25 Jun 2021 09:55:05 +0000 Subject: [PATCH] Logik in den Actor ausgelagert --- src/de/uhilger/httpserver/adoc/AdocFilter.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/de/uhilger/httpserver/adoc/AdocFilter.java b/src/de/uhilger/httpserver/adoc/AdocFilter.java index 27eeef4..137dbec 100644 --- a/src/de/uhilger/httpserver/adoc/AdocFilter.java +++ b/src/de/uhilger/httpserver/adoc/AdocFilter.java @@ -20,6 +20,7 @@ import com.sun.net.httpserver.Filter; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; +import de.uhilger.httpserver.base.handler.FileHandler; import java.io.File; import java.io.IOException; import java.net.URI; @@ -52,14 +53,13 @@ if(requestPathStr.toLowerCase().endsWith(ADOC)) { logger.fine("filter: " + requestPathStr); HttpHandler handler = exchange.getHttpContext().getHandler(); - if(handler instanceof AdocHandler) { - AdocHandler adocHandler = (AdocHandler) handler; - String fileBase = adocHandler.getFileBase(); + if(handler instanceof FileHandler) { + FileHandler fileHandler = (FileHandler) handler; + String fileBase = fileHandler.getFileBase(); AdocActor actor = new AdocActor(); - actor.processAdocFile(new File(fileBase, adocHandler.getFileName(exchange)), Boolean.FALSE.toString()); + actor.processAdocFile(new File(fileBase, fileHandler.getFileName(exchange)), Boolean.FALSE.toString()); } - } - + } chain.doFilter(exchange); } -- Gitblit v1.9.3