rtspconnection: Problem when parsing vendor specific RTSP response with data after Content-Length
Submitted by Davy
Link to original bug (#757118)
Description
Created attachment 314107
patch file_1
Above is abnormal RTSP response from specific IP camera vendor:
"
RTSP/1.0 200 OK
CSeq: 7
Content-Length: 0
Content-Type: text/parameters
Session: 276550300
framerate: 30
"
As you can see, they send message-body but content-length is zero, in response of keep-alive request (e.g. get parameter)
so that "framerate: 30" would be ignored by parse_line(..)
at this stage every things OK.
However we got trouble when parsing next response from server.
Because read_ahead stay in "READ_AHEAD_CRLF" state ('f'ramerate)
To resolve this problem, I think it have to be initialized to default value (0) when create new build (build_next, STATE_START) as attached patch
Patch 314107, "patch file_1":
build_next.patch