From: Mike Brady Date: Wed, 14 Nov 2018 17:21:30 +0000 (+0000) Subject: Add a little diagnostic to see what's in the POST message.: X-Git-Tag: 3.3RC0~176 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99374ac11313d4d4798c99ec0ace140cfa662d68;p=thirdparty%2Fshairport-sync.git Add a little diagnostic to see what's in the POST message.: --- diff --git a/rtsp.c b/rtsp.c index adb2dc50..73d8d05a 100644 --- a/rtsp.c +++ b/rtsp.c @@ -2063,9 +2063,28 @@ static void *rtsp_conversation_thread_func(void *pconn) { break; } } - if (method_selected == 0) + if (method_selected == 0) { debug(1, "RTSP thread %d: Unrecognised and unhandled rtsp request \"%s\".", conn->connection_number, req->method); + + + int y = req->contentlength; + if (y > 0) { + char obf[4096]; + if (y > 4096) + y = 4096; + char *p = req->content; + char *obfp = obf; + int obfc; + for (obfc = 0; obfc < y; obfc++) { + snprintf(obfp, 3, "%02X", (unsigned int)p); + p++; + obfp += 2; + }; + *obfp = 0; + debug(1, "Content: \"%s\".",obf); + } + } } debug(debug_level, "RTSP thread %d: RTSP Response:", conn->connection_number); debug_print_msg_headers(debug_level, resp);