Address Book Collections d:resourcetype

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Address Book Collections d:resourcetype

Oren Sadeh
Hi,
I am developing a CardDAV implementation, and I see some incompatibility with the RFC 6352 Section 5.2 , which states:


Address book collections appear to clients as a WebDAV collection
   resource, identified by a URL.  An address book collection MUST
   report the DAV:collection and CARDDAV:addressbook XML elements in the
   value of the DAV:resourcetype property.  



While in my implementation, only DAV:collection is reported, and CARDDAV:addressbook is omitted. 


<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav"
    xmlns:d="DAV:">
    <d:response>
        <d:href>/users/example%40gmail.com/</d:href>
        <d:propstat>
            <d:prop>
                <d:displayname>[hidden email]</d:displayname>
                <d:current-user-privilege-set>
                    <d:privilege>
                        <d:all />
                    </d:privilege>
                </d:current-user-privilege-set>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>



Debugging into this issue, I found that DefaultPropFindPropertyBuilder.processResource picks this element from the WebDavProtocol PropertySource, rather than the CardDavProtocol PropertySource
Is this a misuse or a bug? Is it configurable or work-around-able?

Thanks,
Oren


_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users
Reply | Threaded
Open this post in threaded view
|

Re: Address Book Collections d:resourcetype

bradmacnz
Hey,

The resource identified by /users/example%40gmail.com/ is most likely a principal resource, not an address book, so is not expected to have the addressbook resource type.

Addressbooks should be inside the principal, under an addressbook home directory. So something like:

/users/example%40gmail.com/addressBooks/default

Milton uses a protocol stack, where each protocol is provided by a class which implements it. The WebDavProtocol class provides webdav resource types such as collection, and the CardDavProtocol class provides resource types specific to carddav, such as addressbook. Note that the carddav protocol is only enabled if there is a valid license file present.

Regards,
Brad


On 13/03/16 19:13, Oren Sadeh wrote:
Hi,
I am developing a CardDAV implementation, and I see some incompatibility with the RFC 6352 Section 5.2 , which states:


Address book collections appear to clients as a WebDAV collection
   resource, identified by a URL.  An address book collection MUST
   report the DAV:collection and CARDDAV:addressbook XML elements in the
   value of the DAV:resourcetype property.  



While in my implementation, only DAV:collection is reported, and CARDDAV:addressbook is omitted. 


<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav"
    xmlns:d="DAV:">
    <d:response>
        <d:href>/users/example%40gmail.com/</d:href>
        <d:propstat>
            <d:prop>
                <d:displayname>[hidden email]</d:displayname>
                <d:current-user-privilege-set>
                    <d:privilege>
                        <d:all />
                    </d:privilege>
                </d:current-user-privilege-set>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>



Debugging into this issue, I found that DefaultPropFindPropertyBuilder.processResource picks this element from the WebDavProtocol PropertySource, rather than the CardDavProtocol PropertySource
Is this a misuse or a bug? Is it configurable or work-around-able?

Thanks,
Oren



_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users


_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users
Reply | Threaded
Open this post in threaded view
|

Re: Address Book Collections d:resourcetype

Oren Sadeh
Thanks for the quick response.

Even when I followed the example in milton-anno-bandstand and added the aBook hierarchy between the principal and the addressbook, I still get this: 


<?xml version="1.0" encoding="utf-8" ?>
<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav"
    xmlns:d="DAV:">
    <d:response>
        <d:href>/users/example%40gmail.com/abooks/</d:href>
        <d:propstat>
            <d:prop>
                <d:displayname>abooks</d:displayname>
                <d:current-user-privilege-set>
                    <d:privilege>
                        <d:all />
                    </d:privilege>
                </d:current-user-privilege-set>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>
....

    <d:response>
        <d:href>/users/example%40gmail.com/abooks/default/</d:href>
        <d:propstat>
            <d:prop>
                <d:displayname>default</d:displayname>
                <d:current-user-privilege-set>
                    <d:privilege>
                        <d:all />
                    </d:privilege>
                </d:current-user-privilege-set>
                <d:resourcetype>
                    <d:collection />
                    <card:addressbook />
                </d:resourcetype>

On Sun, Mar 13, 2016 at 11:16 PM, Brad McEvoy <[hidden email]> wrote:
Hey,

The resource identified by /users/example%40gmail.com/ is most likely a principal resource, not an address book, so is not expected to have the addressbook resource type.

Addressbooks should be inside the principal, under an addressbook home directory. So something like:

/users/example%40gmail.com/addressBooks/default

Milton uses a protocol stack, where each protocol is provided by a class which implements it. The WebDavProtocol class provides webdav resource types such as collection, and the CardDavProtocol class provides resource types specific to carddav, such as addressbook. Note that the carddav protocol is only enabled if there is a valid license file present.

Regards,
Brad



On 13/03/16 19:13, Oren Sadeh wrote:
Hi,
I am developing a CardDAV implementation, and I see some incompatibility with the RFC 6352 Section 5.2 , which states:


Address book collections appear to clients as a WebDAV collection
   resource, identified by a URL.  An address book collection MUST
   report the DAV:collection and CARDDAV:addressbook XML elements in the
   value of the DAV:resourcetype property.  



While in my implementation, only DAV:collection is reported, and CARDDAV:addressbook is omitted. 


<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav"
    xmlns:d="DAV:">
    <d:response>
        <d:href>/users/example%40gmail.com/</d:href>
        <d:propstat>
            <d:prop>
                <d:displayname>[hidden email]</d:displayname>
                <d:current-user-privilege-set>
                    <d:privilege>
                        <d:all />
                    </d:privilege>
                </d:current-user-privilege-set>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>



Debugging into this issue, I found that DefaultPropFindPropertyBuilder.processResource picks this element from the WebDavProtocol PropertySource, rather than the CardDavProtocol PropertySource
Is this a misuse or a bug? Is it configurable or work-around-able?

Thanks,
Oren



_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users


_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users



_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users
Reply | Threaded
Open this post in threaded view
|

Re: Address Book Collections d:resourcetype

bradmacnz
Yes, this href - /users/example%40gmail.com/abooks/ - refers to an address book home folder, so that is also not an address book resource

The address book would be something like this /users/example%40gmail.com/abooks/default/


On 14/03/16 11:12, Oren Sadeh wrote:
Thanks for the quick response.

Even when I followed the example in milton-anno-bandstand and added the aBook hierarchy between the principal and the addressbook, I still get this: 


<?xml version="1.0" encoding="utf-8" ?>
<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav"
    xmlns:d="DAV:">
    <d:response>
        <d:href>/users/example%40gmail.com/abooks/</d:href>
        <d:propstat>
            <d:prop>
                <d:displayname>abooks</d:displayname>
                <d:current-user-privilege-set>
                    <d:privilege>
                        <d:all />
                    </d:privilege>
                </d:current-user-privilege-set>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>
....

    <d:response>
        <d:href>/users/example%40gmail.com/abooks/default/</d:href>
        <d:propstat>
            <d:prop>
                <d:displayname>default</d:displayname>
                <d:current-user-privilege-set>
                    <d:privilege>
                        <d:all />
                    </d:privilege>
                </d:current-user-privilege-set>
                <d:resourcetype>
                    <d:collection />
                    <card:addressbook />
                </d:resourcetype>

On Sun, Mar 13, 2016 at 11:16 PM, Brad McEvoy <[hidden email]> wrote:
Hey,

The resource identified by /users/example%40gmail.com/ is most likely a principal resource, not an address book, so is not expected to have the addressbook resource type.

Addressbooks should be inside the principal, under an addressbook home directory. So something like:

/users/example%40gmail.com/addressBooks/default

Milton uses a protocol stack, where each protocol is provided by a class which implements it. The WebDavProtocol class provides webdav resource types such as collection, and the CardDavProtocol class provides resource types specific to carddav, such as addressbook. Note that the carddav protocol is only enabled if there is a valid license file present.

Regards,
Brad



On 13/03/16 19:13, Oren Sadeh wrote:
Hi,
I am developing a CardDAV implementation, and I see some incompatibility with the RFC 6352 Section 5.2 , which states:


Address book collections appear to clients as a WebDAV collection
   resource, identified by a URL.  An address book collection MUST
   report the DAV:collection and CARDDAV:addressbook XML elements in the
   value of the DAV:resourcetype property.  



While in my implementation, only DAV:collection is reported, and CARDDAV:addressbook is omitted. 


<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav"
    xmlns:d="DAV:">
    <d:response>
        <d:href>/users/example%40gmail.com/</d:href>
        <d:propstat>
            <d:prop>
                <d:displayname>[hidden email]</d:displayname>
                <d:current-user-privilege-set>
                    <d:privilege>
                        <d:all />
                    </d:privilege>
                </d:current-user-privilege-set>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>



Debugging into this issue, I found that DefaultPropFindPropertyBuilder.processResource picks this element from the WebDavProtocol PropertySource, rather than the CardDavProtocol PropertySource
Is this a misuse or a bug? Is it configurable or work-around-able?

Thanks,
Oren



_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users


_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users




_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users