Subject: [VCARDDAV] Content-type parameter

From: Cyrus Daboo <[email-masked]>
Date: Mon, 18 Aug 2008 16:33:59 -0400

Hi folks,
iCalendar (RFC2445) defines the MIME content-type "text/calendar". But it 
also defines an optional parameter "component" that can be included in the 
content-type and used to indicate whether the content is an event, todo 
etc. e.g.:

Content-Type:text/calendar;component=vevent

For vCard, I think it would make sense to have an optional parameter "kind" 
that reflects the value of the KIND property in the vCard data. That way 
clients can adjust their display of a vcard object simply by examining the 
content-type (e.g. show a single user icon for the "individual" kind, or a 
multi-user icon for group etc). e.g.:

Content-Type:text/vcard;kind=group

Whilst it is not required to have this parameter, CardDAV servers could 
easily determine what value it ought to be and make sure it appears 
correctly in the appropriate WebDAV property, to aid clients.

-- 
Cyrus Daboo

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

---

From: Helge Hess <[email-masked]>
Date: Mon, 18 Aug 2008 23:10:48 +0200

On 18.08.2008, at 22:33, Cyrus Daboo wrote:
> Hi folks,
> iCalendar (RFC2445) defines the MIME content-type "text/calendar".  
> But it also defines an optional parameter "component" that can be  
> included in the content-type and used to indicate whether the  
> content is an event, todo etc. e.g.:
>
> For vCard, I think it would make sense to have an optional parameter  
> "kind" that reflects the value of the KIND property in the vCard  
> data. That way clients can adjust their display of a vcard object  
> simply by examining the content-type (e.g. show a single user icon  
> for the "individual" kind, or a multi-user icon for group etc). e.g.:
>
> Whilst it is not required to have this parameter, CardDAV servers  
> could easily determine what value it ought to be and make sure it  
> appears correctly in the appropriate WebDAV property, to aid clients.

Is there already an example on how that would aid clients in the vCard  
case?

Let me elaborate on why text/calendar;component= is useful. The  
problem is that a CalDAV collection potentially contains events, todos  
and journal entries. But in some clients (Outlook) a collection can  
only contain a specific type (either tasks OR events OR journal  
entries). Hence such clients need to map a single CalDAV collection to  
multiple local folders. When they do a PROPFIND on the collection with  
the <getcontenttype> property, they can't know the specific subtype  
(event/todo) w/o actually fetching and parsing the text/calendar  
entity. This is where component= helps a bit - the decision can be  
made w/o actually GETing the content. (yes yes, it can be optimized  
with a better cache which spans collections ;-)

Anyways, I don't see how clients would see a similiar benefit for  
vCards. Its a CalDAV/Outlook specialty.

BTW: a disadvantage of component= (and kind=) is that it further  
bloats PROPFIND responses. Though those compress (Content-Encoding:  
gzip) very well, so it might be irrelevant.

Thanks,
   Helge
-- 
Helge Hess
http://zideone.com/

---

From: Simon Perreault <[email-masked]>
Date: Mon, 18 Aug 2008 17:46:14 -0400

> Content-Type:text/vcard;kind=group

How would this work for text/vcard blobs that contain multiple vCards? Would 
this parameter be restricted to CardDAV? If so, it should be defined in the 
CardDAV RFC. Also, would it make sense to prefix it with something 
like "carddav-"?

-- 
Please try Numb, a STUN/TURN server implementation.
Free access at http://numb.viagenie.ca/.
_______________________________________________
VCARDDAV mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/vcarddav

---

From: Helge Hess <[email-masked]>
Date: Mon, 18 Aug 2008 23:52:04 +0200

On 18.08.2008, at 23:46, Simon Perreault wrote:
> How would this work for text/vcard blobs that contain multiple vCards?

Its strictly optional, its only set if the entity contains the  
specific, distinct type.

> Would this parameter be restricted to CardDAV?

No, why?

Greets,
   Helge
-- 
Helge Hess
http://helgehess.eu/

---

From: Simon Perreault <[email-masked]>
Date: Mon, 18 Aug 2008 20:11:58 -0400

> Its strictly optional, its only set if the entity contains the

I'm sorry, I'm a bit confused. Do you mean that the "kind" parameter could 
only be applied to text/vcard resources that only contain a single vCard?

> > Would this parameter be restricted to CardDAV?

Because CardDAV specifies that resources must only contain a single vCard.

---

From: Helge Hess <[email-masked]>
Date: Tue, 19 Aug 2008 09:19:11 +0200

> only be applied to text/vcard resources that only contain a single  

That is a good question, I would say no. In fact multiple values could  
be allowed, eg:

   text/vcard; kind=group; kind=person
or
   text/vcard; kind=group,person

(contains multiple vCards of type group or person).

I have no strong opinion on that.

> Because CardDAV specifies that resources must only contain a single  

Yes. I asked why one would _restrict_ it to CardDAV? Could be useful  
in arbitrary contexts (eg IMAP4 too).

Thanks,
   Helge