Subject: [sipcore] draft-ietf-sipcore-info-events-02: empty content

From: Brett Tate <[email-masked]>
Date: Mon, 26 Oct 2009 09:38:34 -0700

Are INFO bodies required for an info-package?  And if so, are 0 length bodies acceptable to meet the requirement?

I ask in case there are packages (such as for "flash-hook") where "Info-Package: flash-hook" can signal the INFO needs without otherwise really needing a body.

Thanks,
Brett

---

From: Paul Kyzivat <[email-masked]>
Date: Mon, 26 Oct 2009 12:49:07 -0400

> Are INFO bodies required for an info-package?  And if so, are 0 length bodies acceptable to meet the requirement?

I seem to recall this being discussed before.
I think the answer was that a body is required, though I don't know why.
I think it should be ok for there not to be a body, though the cases 
where that would be useful are few.

AFAIK there is no distinction between a zero length body and no body.

	Thanks,
	Paul

> _______________________________________________
> sipcore mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/sipcore
>

---

From: Brett Tate <[email-masked]>
Date: Mon, 26 Oct 2009 10:20:48 -0700

Thanks for the response.  Reply inline.

> Brett Tate wrote:
> > Are INFO bodies required for an info-package?  And if so, are
> > 0 length bodies acceptable to meet the requirement?
> 

If I recall correctly, body usage was desired to prevent packages being defined to use headers instead of bodies to communicate their needs.  Although I did not try very hard, I was unable to find explicit text within the draft requiring a body.

<snip>

> AFAIK there is no distinction between a zero length body and no body.

It has been argued both ways over the years.  If the draft is going to require a body, it should likely be explicit if 0 length bodies do not meet the requirement.

---

From: "Christer Holmberg" <[email-masked]>
Date: Mon, 26 Oct 2009 18:28:10 +0100

Hi,

>I ask in case there are packages (such as for "flash-hook") where "Info-Package: flash-hook" can signal the INFO needs without otherwise really needing a body.
 
The current assumption is that all data associated with the I-P will be carried in the message body.
 
But, if there is no data, e.g. in your example where the Info Package name "says it all", I see no reason to require a dummy body just in order to have a body...
 
Regards,
 
Christer

---

From: "Christer Holmberg" <[email-masked]>
Date: Mon, 26 Oct 2009 18:30:05 +0100

Hi,
 
>If I recall correctly, body usage was desired to prevent packages being defined to use headers instead of bodies to communicate their needs.  
 
That is correct. If there is data associated with the I-P, it MUST be carried in a body. You cannot "re-use" headers.
 
>Although I did not try very hard, I was unable to find explicit text within the draft requiring a body.

If there is no information in addtion to the I-P name, you don't need a body. 

Whether such packages makes sense is another issue :)

>It has been argued both ways over the years.  If the draft is going to require a body, it should likely be explicit if 0 length bodies do not meet the requirement.

I am not sure I understand. In my opinion C-L 0 means no body.

For example, if you use TCP, you MUST set the C-L value. And, if there is no body, you use C-L 0.

Regards,

Christer

---

From: Brett Tate <[email-masked]>
Date: Mon, 26 Oct 2009 11:02:45 -0700

> >It has been argued both ways over the years.  If the draft is going to
> require a body, it should likely be explicit if 0 length bodies do not
> meet the requirement.
> 

The debate usually relates to the validity of Content-Type, and other Content-* headers present when Content-Length is 0.  The following is a snippet from Henning's reply to my question years ago (9/28/2000).  Sorry, I don't recall how to link to the old "[email-masked]" email threads for reference.

"technically, there is nothing wrong with 

Content-Type: text/plain
Content-Length: 0

Who says that a text object cannot have zero length?"

---

From: "Christer Holmberg" <[email-masked]>
Date: Mon, 26 Oct 2009 19:07:17 +0100

Hi,

>The debate usually relates to the validity of Content-Type, and other Content-* headers present when Content-Length is 0.  The following is a snippet from Henning's reply to my question years ago 
>(9/28/2000).  Sorry, I don't recall how to link to the old "[email-masked]" email threads for reference.
>

Ok, so it can have zero length...

But, I see no reason to mandate such thing for Info Packages. 

Regards,

Christer

---

From: Brett Tate <[email-masked]>
Date: Mon, 26 Oct 2009 11:38:20 -0700

> But, I see no reason to mandate such thing for Info Packages.

Sounds good to me.  An info package can be defined without the need to use bodies.

---

From: "Christer Holmberg" <[email-masked]>
Date: Mon, 26 Oct 2009 22:06:03 +0100

>Sounds good to me.  An info package can be defined without the need to use bodies.
 
We could say something like this:
 
"Any information associated with the Info Package, apart from the Info Package name, MUST be transported in the message body of the request."
 
Then we don't require a body, in case there would be a package where the package name is enough.
 
Regards,
 
Christer

---

From: Brett Tate <[email-masked]>
Date: Mon, 26 Oct 2009 15:00:58 -0700

Hi Christer,

Concerning the topic of INFO headers versus body, I don't have a strong opinion.  I'm actually more in favor of the draft not being overly restrictive concerning what headers or bodies might be needed for the INFO packages.

The mention text appears to conflict with potential Info-Package parameters.  However without such restrictions, vendors might be tempted to start shoving package data within Info-Package header as parameters when a body might be more appropriate. :)

> -----Original Message-----
> From: Christer Holmberg [mailto:[email-masked]]
> Sent: Monday, October 26, 2009 5:06 PM
> To: Brett Tate; Paul Kyzivat
> Cc: SIPCORE
> Subject: RE: [sipcore] draft-ietf-sipcore-info-events-02: empty content
> 
> 
> "Any information associated with the Info Package, apart from the Info
> Package name, MUST be transported in the message body of the request."
>

---

From: "Christer Holmberg" <[email-masked]>
Date: Mon, 26 Oct 2009 23:21:50 +0100

Hi, 

>Concerning the topic of INFO headers versus body, I don't have a strong
opinion.  I'm actually more in favor of the draft not being overly
restrictive concerning what headers or bodies might be needed 
>for the INFO packages.

Previous versions of the draft did allow "re-use" of headers. However,
there was a comment that an application may not always know whether
specific headers will be included, and whether they would always contain
the value intended by the application (the application may not have
access to all SIP headers), so for that reason we decided that the
information shall be in the body - even if in some cases the information
could also be retreived from some SIP header.

>The mention text appears to conflict with potential Info-Package
parameters.

Good point. The text should say "apart from the Info Package name and
potential Info-Package header field parameters".

>However without such restrictions, vendors might be tempted to start
shoving package data within Info-Package header as parameters when a
body might be more appropriate. :)

Well, using header field values is not specific to Info Packages, so I
guess we just need to trust that people do what is best for the protocol
:)

I guess we could say something that the parameters should contain
information associated with the usage of the I-P, rather than pure
application data.

Regards,

Christer

> >Sounds good to me.  An info package can be defined without the need 
> >to
> use bodies.
>