From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sun, 8 Oct 2023 16:43:02 +0000 (+0100) Subject: Return code 200 for a POST of type /feedback, and continue to return 500 for everythi... X-Git-Tag: 4.3.2^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cd3c1da4bca050d092a54706dc2ddd128fd9a05;p=thirdparty%2Fshairport-sync.git Return code 200 for a POST of type /feedback, and continue to return 500 for everything else. --- diff --git a/rtsp.c b/rtsp.c index 44058fda..217fe0a6 100644 --- a/rtsp.c +++ b/rtsp.c @@ -2055,12 +2055,17 @@ void handle_get(__attribute((unused)) rtsp_conn_info *conn, __attribute((unused) resp->respcode = 500; } -void handle_post(rtsp_conn_info *conn, rtsp_message *req, - __attribute((unused)) rtsp_message *resp) { - debug(1, "Connection %d: POST %s Content-Length %d", conn->connection_number, req->path, - req->contentlength); +void handle_post(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) { resp->respcode = 500; + if (strcmp(req->path, "/feedback") == 0) { + resp->respcode = 200; + } else { + debug(1, "Connection %d: Airplay 1. Unhandled POST %s Content-Length %d", conn->connection_number, + req->path, req->contentlength); + debug_log_rtsp_message(2, "POST request", req); + } } + #endif #ifdef CONFIG_AIRPLAY_2