Allow non-json / x-pem requests and responses.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-05-04 01:01:30 +02:00
parent c4bffd5433
commit 0cc24a9637
2 changed files with 5 additions and 3 deletions

View File

@@ -754,7 +754,7 @@ void rest_handle_request(rest_conn_t *conn) {
rest_debug_dump_payload("request-body", request->body, request->body_len);
if (request->method == REST_HTTP_POST || request->method == REST_HTTP_PUT) {
if (!rest_content_type_is_json(request->content_type)) {
if (!rest_content_type_is_json(request->content_type) && strncasecmp(request->content_type, "application/x-pem-file", 22) != 0) {
send_json_error(conn, 415, "content_type_must_be_application_json");
return;
}