From 1d695f99b80503bd6efbf181e6b8733ba3d1fb25 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Sun, 09 Jan 2022 14:26:06 +0000
Subject: [PATCH] Logging entfernt

---
 src/de/uhilger/httpserver/adoc/AdocHandler.java |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/de/uhilger/httpserver/adoc/AdocHandler.java b/src/de/uhilger/httpserver/adoc/AdocHandler.java
index 1279e67..8a6cab5 100644
--- a/src/de/uhilger/httpserver/adoc/AdocHandler.java
+++ b/src/de/uhilger/httpserver/adoc/AdocHandler.java
@@ -59,9 +59,14 @@
     String ctxPath = e.getHttpContext().getPath();
     String uriPath = e.getRequestURI().getPath();
     String fName = uriPath.substring(ctxPath.length());
-    
+        
     AdocActor actor = new AdocActor();
-    actor.handle(e, e.getHttpContext().getAttributes().get(FileHandler.ATTR_FILE_BASE).toString(), fName);
+    String query = uri.getQuery();
+    if(query != null && query.equalsIgnoreCase("pdf=true")) {
+      actor.handle(e, e.getHttpContext().getAttributes().get(FileHandler.ATTR_FILE_BASE).toString(), fName, true);
+    } else {
+      actor.handle(e, e.getHttpContext().getAttributes().get(FileHandler.ATTR_FILE_BASE).toString(), fName, false);
+    }
   }
   
   

--
Gitblit v1.9.3