mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-02 12:30:39 +00:00
Change content-type check to check contains
So far it was doing an equals check, but a string like "application/json; charset=utf-8" is similarly valid. And some clients like OkHttp actually automatically add the charset.
This commit is contained in:
parent
161ec9f828
commit
594faaf288
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ public class HttpServerHandler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!"application/json".equals(httpExchange.getRequestHeaders().getFirst("Content-Type"))) {
|
if (!"application/json".contains(httpExchange.getRequestHeaders().getFirst("Content-Type"))) {
|
||||||
sendResponse(415, null, httpExchange);
|
sendResponse(415, null, httpExchange);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue