Subject: RE: [Simple] NOTIFY without message-body

From: [email-masked]
Date: Wed, 22 Sep 2004 10:47:11 +0300

> -----Original Message-----
> From: [email-masked] 
> [mailto:[email-masked]]On Behalf
> Of ext Jonathan Rosenberg
> Sent: 20.September.2004 08:04
> To: Paul Kyzivat
> Cc: Pessi Pekka (Nokia-NRC/Helsinki); [email-masked]
> Subject: Re: [Simple] NOTIFY without message-body
> 
> 
> 
> 
> Paul Kyzivat wrote:
> 
> > Jonathan,
> > 
> > What you suggest is plausible, but I don't recall ever 
> seeing anything 
> > written that discusses the meaning of a Content-Type with 
> an empty body.
> > 
> > That logic would imply that there is (conceptually) a 
> special content 
> > type for which an empty body is valid and a non-empty body 
> is not, and 
> > that this is a default content-type when the body is empty.
> 
> I don't see how you would come to this conclusion. There is 
> no default 
> value for Content-Type.

I agree here. Also, the presence of Content-* header does not mean there is a body. Take for example Content-Length. Many implementations set that to 0. This could be 2 things:

1. There is no body
2. There is a body, but it has a length of 0.

If the interperetation is 2, then content-type needs to have default. We have so have assumed that content-length: 0 means no body (ie. 1 above).

> 
> 
> 
> > 
> > I believe I have seen stacks that considered the presence 
> of a content 
> > type header invalid if there is no body. At the least there 
> ought to be 
> > something that says this is valid usage.
> 
> It is written, in RFC 3261, section 20.15:
> 
> 20.15 Content-Type
> 
>     The Content-Type header field indicates the media type of the
>     message-body sent to the recipient.  The "media-type" element is
>     defined in [H3.7].  The Content-Type header field MUST be 
> present if
>     the body is not empty.  If the body is empty, and a Content-Type
>     header field is present, it indicates that the body of 
> the specific
>     type has zero length (for example, an empty audio file).

This may result in a 400 response being returned for, say, XML bodies since they are not valid (actually, it is unclear what the exact SIP error response for a malformed body should be. This was an issue at the last SIPit).

Regards,
Hisham

> 
> 
> -Jonathan R.
> 
> -- 
> Jonathan D. Rosenberg, Ph.D.                600 Lanidex Plaza
> Chief Technology Officer                    Parsippany, NJ 07054-2711
> dynamicsoft
> [email-masked]                     FAX:   (973) 952-5050
> http://www.jdrosen.net                      PHONE: (973) 952-5000
> http://www.dynamicsoft.com
> 
> _______________________________________________
> Simple mailing list
> [email-masked]
> https://www1.ietf.org/mailman/listinfo/simple
> 

_______________________________________________
Simple mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/simple