mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
rtsp-client: Also handle the (S|G)ET_PARAMETER case of size==0 || !data as keep-alive
If there is no Content-Length header, no body would be allocated and the '\0' would also not be appended to the body.
This commit is contained in:
parent
ac1124efb4
commit
cd4e675f0c
1 changed files with 4 additions and 4 deletions
|
@ -1250,8 +1250,8 @@ handle_get_param_request (GstRTSPClient * client, GstRTSPContext * ctx)
|
|||
if (res != GST_RTSP_OK)
|
||||
goto bad_request;
|
||||
|
||||
if (size == 1) {
|
||||
/* no body (only '\0'), keep-alive request */
|
||||
if (size == 0 || !data || strlen ((char *) data) == 0) {
|
||||
/* no body (or only '\0'), keep-alive request */
|
||||
send_generic_response (client, GST_RTSP_STS_OK, ctx);
|
||||
} else {
|
||||
/* there is a body, handle the params */
|
||||
|
@ -1302,8 +1302,8 @@ handle_set_param_request (GstRTSPClient * client, GstRTSPContext * ctx)
|
|||
if (res != GST_RTSP_OK)
|
||||
goto bad_request;
|
||||
|
||||
if (size == 1) {
|
||||
/* no body (only '\0'), keep-alive request */
|
||||
if (size == 0 || !data || strlen ((char *) data) == 0) {
|
||||
/* no body (or only '\0'), keep-alive request */
|
||||
send_generic_response (client, GST_RTSP_STS_OK, ctx);
|
||||
} else {
|
||||
/* there is a body, handle the params */
|
||||
|
|
Loading…
Reference in a new issue