Subject: [SIP] Content Lenght in responses

From: "Natarajan Kalpathy" <[email-masked]>
Date: Tue, 2 May 2000 19:25:36 -0500

Why is the Content Length field not mandatory in cases of SIP responses ??. Wont
it simplify the message processing in case of TCP. The current rfc2543bis draft
says

"If a response does not contain a Content-Length, the client assumes that it
encompasses the remainder
of the UDP packet or the data until the TCP connection is closed, as applicable.
"

Please clarify ....

Natarajan

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip

---

From: Jonathan Rosenberg <[email-masked]>
Date: Wed, 03 May 2000 00:33:00 -0400

> of the UDP packet or the data until the TCP connection is closed, as applicable.

I believe this is the result of legacy HTTP, where Content-Length is not
mandatory in responses. I also believe this is because CGI scripts that
generate dynamic content wouldn't know the Content Length ahead of time,
so just sending data, and then closing the connection, was the easiest
way to determine message length. I can certainly envision placing of
dynamic content in SIP responses, so this may prove useful for us as
well.

Processing of responses without content length is pretty simple anyway.
It just means an additional counter that counts actual bytes read from
the response. When the connection closes, this value is your content
length.

-Jonathan R.

-- 
Jonathan D. Rosenberg                       72 Eagle Rock Ave.
Chief Scientist                             First Floor
dynamicsoft                                 East Hanover, NJ 07936
[email-masked]                     FAX:   (732) 741-4778
http://www.cs.columbia.edu/~jdrosen         PHONE: (732) 741-7244
http://www.dynamicsoft.com