To follow up to Paul's message, the situation of an empty and/or missing
body is not well-specified in SIP, and a SIP parser should be careful to
"be liberal in what you accept".  In particular, if the observed or
specified content length is zero, it *might* be that there is no body,
or it *might* be that a body is present (of the type specified by
Content-Type), but its encoding has zero length (the significance of
which depends on the Content-Type).  If the processing of the message
would succeed under one or the other of these conditions, it should
succeed.

In addition, if the processing of the message does not require knowing
the contents of the body, it should succeed even if the body is
unexpected, has an unknown Content-Type, or is invalid for its
Content-Type.  (Although it seems reasonable to be stricter regarding
multipart types, and perhaps require that the multipart structure per se
is valid.)

I am reminded of the sipX system, which when genereating error
responses, would add a body of type message/sip, which was the request
that caused the error.  This allowed the UAC to see in the error
response what the request looked like at the point where the error was
generated.  We never found any UAC that failed because of the unexpected
body (since no defined error responses at the time had specified bodies).

Dale
_______________________________________________
Sip-implementors mailing list
Sip-implementors@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/sip-implementors

Reply via email to