rtspconnection: ignore timeout in session request header

The timeout parameter is only allowed in a session response header
but some clients, like Honeywell VMS applications, send it as part
of the session request header. Ignore everything from the semicolon
to the end of the line when parsing session id.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=736267
This commit is contained in:
Ognyan Tonchev 2014-09-09 11:37:26 +02:00 committed by Wim Taymans
parent a2122f04ec
commit 0ea1b559bf

View file

@ -1782,6 +1782,19 @@ parse_line (guint8 * buffer, GstRTSPMessage * msg)
next_value++;
}
if (field == GST_RTSP_HDR_SESSION) {
/* The timeout parameter is only allowed in a session response header
* but some clients send it as part of the session request header.
* Ignore everything from the semicolon to the end of the line. */
next_value = value;
while (*next_value != '\0') {
if (*next_value == ';') {
break;
}
next_value++;
}
}
/* trim space */
if (value != next_value && next_value[-1] == ' ')
next_value[-1] = '\0';