]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/http/HttpServerHandler.java
Change content-type check to check contains
[signal-cli] / src / main / java / org / asamk / signal / http / HttpServerHandler.java
index a62139291e36e1394e02698682c1536bd6a14fca..f7d06b154dd73e7950979a832b9c4113b53b910b 100644 (file)
@@ -89,7 +89,8 @@ public class HttpServerHandler {
             return;
         }
 
-        if (!"application/json".equals(httpExchange.getRequestHeaders().getFirst("Content-Type"))) {
+        final var contentType = httpExchange.getRequestHeaders().getFirst("Content-Type");
+        if (contentType == null || !contentType.startsWith("application/json")) {
             sendResponse(415, null, httpExchange);
             return;
         }