Asciidoctor mit Neon transformieren
ulrich
2021-07-03 1b0a18d44180a3c19ae9325bb599831708804c03
src/de/uhilger/httpserver/adoc/AdocFilter.java
@@ -20,6 +20,8 @@
import com.sun.net.httpserver.Filter;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import de.uhilger.httpserver.base.HttpHelper;
import de.uhilger.httpserver.base.handler.FileHandler;
import java.io.File;
import java.io.IOException;
import java.net.URI;
@@ -52,11 +54,12 @@
    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 = exchange.getHttpContext().getAttributes().get(FileHandler.ATTR_FILE_BASE).toString();
        AdocActor actor = new AdocActor();
        actor.processAdocFile(new File(fileBase, adocHandler.getFileName(exchange)), Boolean.FALSE.toString());
        HttpHelper helper = new HttpHelper();
        actor.processAdocFile(new File(fileBase, helper.getFileName(exchange)), Boolean.FALSE.toString());
      }
    }    
    chain.doFilter(exchange);