Subject: RE: [SIP] Content Lenght in responses

From: "Hans-henrik Veisner (DXD)" <[email-masked]>
Date: Thu, 4 May 2000 17:30:01 +0200

Hi!

What about the case where a UAC sends an INVITE and the UAS returns a 18x response and closes the connection to indicate the end of the message. Shouldn't the UAC interpret this as a 500 response as described in section 10.3 in the rfc2543bis draft?

Hans-Henrik Veisner,
ANS IP Convergence
Ericsson Diax

-----Original Message-----
From: Jonathan Rosenberg [mailto:[email-masked]]
Sent: 3. maj 2000 06:33
To: Natarajan Kalpathy
Cc: [email-masked]
Subject: Re: [SIP] Content Lenght in responses

Natarajan Kalpathy wrote:
> 
> 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 ....

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

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

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

---

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 04 May 2000 22:20:41 -0400

> What about the case where a UAC sends an INVITE and the UAS returns a 18x response and closes the connection to indicate the end of the message. Shouldn't the UAC interpret this as a 500 response a…

Yes. If you still have more responses to send after the 18x, include a
Content-Length rather than closing the connection.

-Jonathan R.