From 0de53ac0c2118e6820ac7df309ee86ca69982483 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Thu, 24 Jun 2021 12:26:35 +0000
Subject: [PATCH] getFileBase in den FileHandler verlegt

---
 src/de/uhilger/httpserver/adoc/AdocFilter.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/de/uhilger/httpserver/adoc/AdocFilter.java b/src/de/uhilger/httpserver/adoc/AdocFilter.java
index a7d7239..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,11 +53,11 @@
     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