Closed GoogleCodeExporter closed 8 years ago
a solution :
else { /* end of stream is reached, do not advance stream pos, but set is_eos
flag */
stream->is_eos = TRUE;
line->length = pos - line->buf;
}
Original comment by amasse.a...@gmail.com
on 11 Mar 2010 at 11:01
Hi Anthony,
Why not? Everything looks clear and straight. Function still returns FALSE for
malformed lines, but sets the length just in case ...
So I've just committed your suggestion to trunk (r1579).
Thanks,
Arsen
Original comment by achalo...@gmail.com
on 11 Mar 2010 at 12:00
In fact, I don't find my solution so pretty ;)
why do you say : "Function still returns FALSE for malformed lines". For you a
stream
must be finished by CF (LF or CRLF) ?
Original comment by amasse.a...@gmail.com
on 11 Mar 2010 at 1:09
> For you a stream must be finished by CF (LF or CRLF) ?
Sure, and I meant this function should return FALSE if line is not properly
terminated and I'll not look into the parsed "line" as before.
From other hand, I'm not sure where you're going to use it, but if it helps,
why not...
Original comment by achalo...@gmail.com
on 11 Mar 2010 at 1:26
To parse the body of this request :
ANNOUNCE rtsp://192.168.1.34:1554/media/ASR RTSP/1.0
CSeq: 2
Session: 95bcb25cbaaa3646
Content-Type: application/mrcp
Content-Length: 154
DEFINE-GRAMMAR 1 MRCP/1.0
Content-Type: text/uri-list
Content-Id: request1@form-level.store
Content-Length: 37
http://www.site.com/jours/jours.grxml
Anthony
Original comment by amasse.a...@gmail.com
on 11 Mar 2010 at 1:30
Well, but shouldn't lines in text/uri-list be terminated with a <CRLF> as well.
See http://tools.ietf.org/html/rfc2483
3) As for all text/* formats, lines are terminated with a CRLF pair.
I assume not all the implementations comply with this rule, though.
Original comment by achalo...@gmail.com
on 11 Mar 2010 at 1:49
Ok, It is also the case with "text/grammar-ref-list", but I prefere to manage
this case
for old mrcp client (no reference to rfc2483 on the MRCPv1 draft)
Thanks
Anthony
Original comment by amasse.a...@gmail.com
on 11 Mar 2010 at 2:04
Original issue reported on code.google.com by
amasse.a...@gmail.com
on 11 Mar 2010 at 10:55