1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

rtsp: ignore whitespace in session id

Follow-up to e577c43bb to fix test case 569 brekage: stop the parser at
whitespace as well.

Help-by: Erik Janssen
This commit is contained in:
Daniel Stenberg 2016-08-11 11:37:00 +02:00
parent 31e33a9a46
commit 2c8ccdac14

View File

@ -799,12 +799,12 @@ CURLcode Curl_rtsp_parseheader(struct connectdata *conn,
/* If the Session ID is not set, and we find it in a response, then set /* If the Session ID is not set, and we find it in a response, then set
* it. * it.
* *
* Allow any content, up to the field seperator or end of line. RFC 2326 * Allow any non whitespace content, up to the field seperator or end of
* isn't 100% clear on the session ID and for example gstreamer does * line. RFC 2326 isn't 100% clear on the session ID and for example
* url-encoded session ID's not covered by the standard. * gstreamer does url-encoded session ID's not covered by the standard.
*/ */
char *end = start; char *end = start;
while(*end && *end != ';') while(*end && *end != ';' && !ISSPACE(*end))
end++; end++;
/* Copy the id substring into a new buffer */ /* Copy the id substring into a new buffer */