Hi Bernie,
you can't await any CRLF character in message bodies. The length of body is
defined by the Content-Length header (number of bytes in body). You must use
this value to read the body. The reason is that the body can generally
contain not only text data but also binary data.

In your case is the Content-Length 4 and the body contains 4 characters
(word "test").

Regards

Mitko


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Bernie
Hoeneisen
Sent: Wednesday, October 20, 2004 3:05 PM
To: SIP Implementors Mailing List
Subject: [Sip-implementors] Message and CRLF after payload


Hi!

I have a question concerning message bodies. A SIP Proxy (storing Messages 
if no delivery possible) had troubles to handle the following kind 
of MESSAGE correctly:

"
   MESSAGE sip:sip-server.ch SIP/2.0
   Via: SIP/2.0/UDP 192.168.48.173;branch=z9hG4bKc07f12a1b
   Max-Forwards: 69
   Content-Length: 4
   To: sip:[EMAIL PROTECTED]
   From: Mr Been <sip:[EMAIL PROTECTED]>;tag=dbefb62825e1027
   Call-ID: 42df35d281d7ff3c354f48ad4769753d
   CSeq: 390039376 MESSAGE
   Contact: sip:192.168.48.173
   Content-Type: text/plain
   User-Agent: MxSF/v3.2.6.26

   test
"

Note, that there is _no_ CR/LF after the string "test". Thus, the message 
finishes immediately after "test"


If there was a CR/LF at the end of the payload, the SIP proxy could handle 
it without problems.

Should Useragents add a CR/LF after each such MESSAGE or is it just the 
proxy that has a bug?

(In the RFCs I could not find a clear indication that CR/LF at the end of 
the payload is required.)

cheers,
  Bernie
_______________________________________________
Sip-implementors mailing list
[EMAIL PROTECTED]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
_______________________________________________
Sip-implementors mailing list
[EMAIL PROTECTED]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors

Reply via email to