From 97823d1cb98fa7865ca44824018e92276146a80d Mon Sep 17 00:00:00 2001 From: ulrich Date: Thu, 13 Mar 2025 16:28:34 +0000 Subject: [PATCH] evtl. enthaltene Query aus Bild-URI herausgelassen --- src/de/uhilger/neon/image/ImageFilter.java | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/de/uhilger/neon/image/ImageFilter.java b/src/de/uhilger/neon/image/ImageFilter.java index 4ef14cd..51f8ff4 100644 --- a/src/de/uhilger/neon/image/ImageFilter.java +++ b/src/de/uhilger/neon/image/ImageFilter.java @@ -68,10 +68,13 @@ */ String pattern = (String) exchange.getHttpContext().getAttributes() .getOrDefault("imageFilterPattern", ".+\\.jpg|.+\\.jpeg|.+\\.png"); - String uriStr = exchange.getRequestURI().toString(); + String uriStr = exchange.getRequestURI().toString().toLowerCase(); + if(uriStr.contains("?")) { + uriStr = uriStr.substring(0, uriStr.indexOf("?")); + } try { String fName = new HttpHelper().getFileName(exchange); - if(uriStr.toLowerCase().matches(pattern)) { + if(uriStr.matches(pattern)) { String fileBase = (String) exchange.getHttpContext().getAttributes() .get(FileServer.ATTR_FILE_BASE); String fileName = exchange -- Gitblit v1.9.3