mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-02 12:30:39 +00:00
Fix check sequence of content type check
This commit is contained in:
parent
594faaf288
commit
361fd8a908
1 changed files with 2 additions and 1 deletions
|
@ -89,7 +89,8 @@ public class HttpServerHandler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!"application/json".contains(httpExchange.getRequestHeaders().getFirst("Content-Type"))) {
|
if (httpExchange.getRequestHeaders().getFirst("Content-Type") == null
|
||||||
|
|| !httpExchange.getRequestHeaders().getFirst("Content-Type").contains("application/json")) {
|
||||||
sendResponse(415, null, httpExchange);
|
sendResponse(415, null, httpExchange);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue