From a07e7e7a3010da502deea0e5020189cb7f8477bc Mon Sep 17 00:00:00 2001
From: ulrich
Date: Wed, 21 Apr 2021 08:59:08 +0000
Subject: [PATCH] Darstellung der Symbolleisten passt sich unterschiedlichen Bidlschirmgroessen an

---
 src/de/uhilger/mediaz/api/AbstractHandler.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/de/uhilger/mediaz/api/AbstractHandler.java b/src/de/uhilger/mediaz/api/AbstractHandler.java
index 728107a..2d9b71a 100644
--- a/src/de/uhilger/mediaz/api/AbstractHandler.java
+++ b/src/de/uhilger/mediaz/api/AbstractHandler.java
@@ -17,6 +17,7 @@
  */
 package de.uhilger.mediaz.api;
 
+import com.sun.net.httpserver.Headers;
 import com.sun.net.httpserver.HttpExchange;
 import com.sun.net.httpserver.HttpHandler;
 import java.io.BufferedReader;
@@ -68,7 +69,7 @@
           response = json;
         } else {
           response = "nicht gefunden";
-          returnCode = RTC_NOT_FOUND;
+          //returnCode = RTC_NOT_FOUND;
         }
         break;
         
@@ -90,6 +91,8 @@
         break;
     }
     logger.fine(response);
+    Headers headers = e.getResponseHeaders();
+    headers.add("Content-Type", "application/json");
     e.sendResponseHeaders(getReturnCode(), response.length());
     OutputStream os = e.getResponseBody();
     os.write(response.getBytes());

--
Gitblit v1.9.3