Subject: [SIP] Content-type

From: [email-masked]
Date: Wed, 27 Sep 2000 22:58:26 -0600

Hello.
Is it a protocol violation for a SIP message to have a Content-type header
without a message body (i.e. Content-length=0)? Not that it makes any sense
to do so, but is it illegal??
Thanks,
Aparna

Aparna V.
Level (3) Communications.

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip

---

From: Neil Deason <[email-masked]>
Date: Thu, 28 Sep 2000 09:20:19 +0100

> to do so, but is it illegal??

Although it would be odd for there to be a Content-Type header
and no body, I don't see this technically illegal (especially
if Content-Length was specified as 0).  I wouldn't rely on
Content-Type to imply the presence or otherwise of a body.

According to the IETF mantra I would say your implementation
should be strict enough not to generate this but flexible
enough to accept it.

Cheers,
Neil.
-- 
Ubiquity Software Corporation, UK        http://www.ubiquity.net

---

From: "Brett Tate" <[email-masked]>
Date: Thu, 28 Sep 2000 05:07:28 -0400

> should be strict enough not to generate this but flexible

I agree.  However should/could a proxy remove
the header before relaying the message since it
clearly violates the definition of Content-Type?
Or should a proxy leave it because some
SIP extension or vendor might extend its
definition?

---

From: Henning Schulzrinne <[email-masked]>
Date: Thu, 28 Sep 2000 08:56:54 -0400

> to do so, but is it illegal??

Hardly illegal, since (just about) any type can be of zero length. Added
a sentence that says to ignore it if the body is empty. 

-- 
Henning Schulzrinne   http://www.cs.columbia.edu/~hgs

---

From: "Jo Hornsby" <[email-masked]>
Date: Thu, 28 Sep 2000 14:15:07 +0100

> SIP extension or vendor might extend its

I would be wary of proxies trying to be too clever here; in
general, they are completely ignorant of message bodies, and
I can see no good reason to remove this header (okay, so it
could potentially make the message a little shorter).

I don't think it's too much of a stretch of the imagination
to imagine a media type that defines zero-length to have
special, but well-defined, sematics; indeed, I would not be
surprised if many such media types already exist.

Cheers,

 - Jo.

---

From: Henning Schulzrinne <[email-masked]>
Date: Thu, 28 Sep 2000 09:22:30 -0400

> SIP extension or vendor might extend its

Proxies are not the protocol police.

Also, technically, there is nothing wrong with 

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

Who says that a text object cannot have zero length?