From 4d253a518cdd889ad84c8f873aa615e14b6d9ca8 Mon Sep 17 00:00:00 2001 From: ulrich Date: Fri, 23 Feb 2024 12:35:51 +0000 Subject: [PATCH] Filter hinzugefuegt --- src/de/uhilger/neon/HttpHelper.java | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/de/uhilger/neon/HttpHelper.java b/src/de/uhilger/neon/HttpHelper.java index 05dcba8..bedb90e 100644 --- a/src/de/uhilger/neon/HttpHelper.java +++ b/src/de/uhilger/neon/HttpHelper.java @@ -97,17 +97,22 @@ public Map<String, String> getQueryMap(String query) { Map<String, String> map = new HashMap<>(); - if(query instanceof String) { - String[] params = query.split(STR_AMP); - for (String param : params) { - String name = param.split(STR_EQUAL)[0]; - String value = param.split(STR_EQUAL)[1]; - map.put(name, value); - } - } else { - // map bleibt leer + try { + if(query instanceof String) { + String[] params = query.split(STR_AMP); + for (String param : params) { + String name = param.split(STR_EQUAL)[0]; + String value = param.split(STR_EQUAL)[1]; + map.put(name, value); + } + } else { + // map bleibt leer + } + } catch(Exception ex) { + + } finally { + return map; } - return map; } /*public String getRouteString(HttpExchange exchange) { -- Gitblit v1.9.3