Subject: [Sip] Editorial question on MIME example

From: "Christer Holmberg" <[email-masked]>
Date: Thu, 20 Dec 2007 09:42:21 +0100

Hi,

I have an editorial (?) question on the MIME message body example in
chapter 23.4.3 of 3261.

INVITE sip:[email-masked] SIP/2.0
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8
To: Bob <sip:[email-masked]>
From: Anonymous <sip:[email-masked]>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 314159 INVITE
Max-Forwards: 70
Date: Thu, 21 Feb 2002 13:02:03 GMT
Contact: <sip:pc33.atlanta.com>
Content-Type:
multipart/signed;protocol="application/pkcs7-signature";micalg=sha1;
boundary=boundary42
Content-Length: 568

--boundary42
Content-Type: application/pkcs7-mime;
smime-type=enveloped-data;name=smime.p7m
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7mhandling=required
Content-Length: 231

***********************************************************
* Content-Type: message/sip                               *
*                                                         *
* INVITE sip:[email-masked] SIP/2.0                       *
* Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 *
* To: Bob <[email-masked]>                                *
Etc etc etc

Now, as far as I know (please correct me if I am wrong) Content-Length
is NOT a MIME header. If so, I guess it shouldn't be used as a MIME
header (together with Content-Type, Content-Transfer-Encoding etc)?

Regards,

Christer

_______________________________________________
Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use [email-masked] for questions on current sip
Use [email-masked] for new developments on the application of sip

---

From: "Dan Wing" <[email-masked]>
Date: Thu, 20 Dec 2007 01:16:21 -0800

> is NOT a MIME header.

Right, it isn't.  It could be argued that SIP's Content-Length was taken from
HTTP (RFC1945) rather than MIME.  It could be argued HTTP took the idea from
email -- Content-Length used to be common in email headers a decade or two ago
(but Content-Length didn't work too well for email for a variety of reasons).
RFC2076 (February 1997) lists it, and says it was not a standard email header
at the time.

> If so, I guess it shouldn't be used as a MIME

RFC2045 does say:

   Any sort of field may be present in the header of an entity,
   but only those fields whose names begin with "content-" actually have
   any MIME-related meaning.

but of course Content-Length doesn't have any meaning to MIME (neither would
Content-Crayon).  But neither of those headers do harm to a MIME parser,
because a MIME parser ignores fields it doesn't understand.

I guess you're saying SIP should have used something like "Length:" instead of
"Content-Length:" to avoid collision with MIME's self-claimed ownership of all
field names that begin with "Content-"?

-d

---

From: "Christer Holmberg" <[email-masked]>
Date: Thu, 20 Dec 2007 10:30:20 +0100

Hi, 

>>is NOT a MIME header.
> 
>Right, it isn't.  It could be argued that SIP's 
>Content-Length was taken from HTTP (RFC1945) rather than 
>MIME.  It could be argued HTTP took the idea from email -- 
>Content-Length used to be common in email headers a decade or 
>two ago (but Content-Length didn't work too well for email 
>for a variety of reasons).
>RFC2076 (February 1997) lists it, and says it was not a 
>standard email header at the time.
> 
>>If so, I guess it shouldn't be used as a MIME header (together with 
>>Content-Type, Content-Transfer-Encoding etc)?
> 
>RFC2045 does say:
> 
> but only those fields whose names begin with "content-" 
> actually have any MIME-related meaning.
> 
>but of course Content-Length doesn't have any meaning to MIME 
>(neither would Content-Crayon).  But neither of those headers 
>do harm to a MIME parser, because a MIME parser ignores 
>fields it doesn't understand.
> 
> 
>I guess you're saying SIP should have used something like 
>"Length:" instead of "Content-Length:" to avoid collision 
>with MIME's self-claimed ownership of all field names that 
>begin with "Content-"?

No no.

I am not talking about the usage of Content-Lenght (or any other
Content- header) in the SIP part of the message. I was referring to the
usage of Content-Length in the MIME part of the message body.

Regards,

Christer

---

From: "Dan Wing" <[email-masked]>
Date: Thu, 20 Dec 2007 09:07:02 -0800

> usage of Content-Length in the MIME part of the message body.

Ah - thanks for clarifying.  So you are referring to the second Content-Length
field in the example at http://tools.ietf.org/html/rfc3261#page-212 -- the
Content-Length field with the value 231.  I agree it shouldn't be in that
example.  Looks like something to add to the Essential Corrections.

-d

---

From: "Christer Holmberg" <[email-masked]>
Date: Fri, 21 Dec 2007 11:52:39 +0100

Hi, 

>>>I guess you're saying SIP should have used something like "Length:" 
>>>instead of "Content-Length:" to avoid collision with MIME's 
>>>self-claimed ownership of all field names that begin with "Content-"?
>> 
>>No no.
>> 
>>Content- header) in the SIP part of the message. I was referring to 
>>the usage of Content-Length in the MIME part of the message body.
> 
>Ah - thanks for clarifying.  So you are referring to the 
>second Content-Length field in the example at 
>http://tools.ietf.org/html/rfc3261#page-212 -- the 
>Content-Length field with the value 231. 

Yes.

>I agree it shouldn't be in that example.  Looks like something to add
to 
>the Essential Corrections.

Ok.

Thanks!

Regards,

Christer