lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, Jul 7, 2014 at 11:05 AM, Austin Einter <> 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...