From 880582a1b37ed54fc719734414c0672f80c3dc74 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Wed, 21 Feb 2024 13:41:44 +0000
Subject: [PATCH] Verarbeitung von Routen um variable Elemente erweitert (einstweilen noch experimentell)

---
 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