From: SIP: Understanding the Session Initiation Protocol

6.4.5 Content-Length

The Content-Length is used to indicate the number of octets in the message
body. A Content-Length: 0 indicates no message body. As described in Section
2.4.2, this header field is used to separate multiple messages sent within a
TCP stream. If not present in a UDP message, the message body is assumed to
continue to the end of the datagram. If not present in a TCP message, the
message body is assumed to continue until the connection is closed. The
Content-Length octet count does not include the CRLF that separates the
message header fields from the message body. It does, however, include the
CRLF at the end of each line of the message body. An example octet
calculation is in Chapter 2. The Content-Length header field is not a
required header field to allow dynamically generated message bodies, where
the Content-Length may not be known a priori. The compact form is l.
Examples include:
Content-Length: 0
l: 287


On 8/28/07, Sudhir Sharma <[EMAIL PROTECTED]> wrote:
>
> Thanks a lot Amit.
>
> Thats was really quick.
>
> - Sudhir
>
> Goyal, Amit wrote:
>
> >Hi Sudhir,
> >
> >I guess this is correct behavior.
> >
> >
> >18.3 Framing
> >In the case of message-oriented transports (such as UDP), if the
> >message has a Content-Length header field, the message body is
> >assumed to contain that many bytes. If there are additional bytes in
> >the transport packet beyond the end of the body, they MUST be
> >discarded. If the transport packet ends before the end of the
> >message body, this is considered an error. If the message is a
> >response, it MUST be discarded. If the message is a request, the
> >element SHOULD generate a 400 (Bad Request) response. If the message
> >has no Content-Length header field, the message body is assumed to
> >end at the end of the transport packet.
> >In the case of stream-oriented transports such as TCP, the Content-
> >Length header field indicates the size of the body. The Content-
> >Length header field MUST be used with stream oriented transports.
> >
> >
> >Regards,
> >Amit Goyal
> >
> >
> >
> >
> >>-----Original Message-----
> >>From: [EMAIL PROTECTED]
> >>
> >>
> >[mailto:sip-implementors-
> >
> >
> >>[EMAIL PROTECTED] On Behalf Of Sudhir Sharma
> >>Sent: Tuesday, August 28, 2007 2:55 PM
> >>To: [email protected]
> >>Subject: [Sip-implementors] Proxy behavior for Content-Length
> >>
> >>Hello,
> >>
> >>Could anybody tell me about the behavior of Proxy when value of
> >>Content-Length header field is less than the actual length of the body?
> >>Currently in such scenario my sip proxy juts forwards the body of the
> >>size mentioned in Content-Length and discards the remaining body.
> >>Is this the correct behavior?
> >>
> >>I could not find relevant information for such case in any SIP RFCs.
> >>
> >>Appreciate your prompt response.
> >>
> >>Thanks,
> >>Sudhir
> >>
> >>
> >>
> >>_______________________________________________
> >>Sip-implementors mailing list
> >>[email protected]
> >>https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors
> >>
> >
> >
> >
>
>
> --
> Sudhir Sharma
> Technical Lead - Genesys BU
> Alcatel-Lucent
>
> Phone: +91-44-22509500 Ext. 7015
> Mobile: +91-9940277855
>
> _______________________________________________
> Sip-implementors mailing list
> [email protected]
> https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors
>
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to