[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Finding intermediate token in a string
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 7 Jul 2014 11:07:49 +0200
On Mon, Jul 7, 2014 at 11:05 AM, Austin Einter <austin.einter@gmail.com> wrote:
> msg = "INVITE\r\nContent-Length : 100 \r\n\r\nv=0\r\n"
> calculate_content_length1(msg, string.len(msg))
> What may be the probable reason?
It's because I didn't read the spec carefully ;)
It will only work if you break up the input into lines delimited by
line feeds...