I've got two different accounts on this website, which store contacts and calendars under owncloud : https://webcloud7.zaclys.com
when I try to retrieve the list of contacts from account 13386 with this :
Code: Select all
let httpChannel = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Components.interfaces.nsIXMLHttpRequest);
httpChannel.open("PROPFIND", url1, true, 13386, password1);
all is OK and I get :
Code: Select all
[{href:["/remote.php/carddav/addressbooks/13386/contacts/"], propstat:[{prop:[{getcontenttype:[null], getetag:[null]}], status:["HTTP/1.1 404 Not Found"]}]}, {href:["/remote.php/carddav/addressbooks/13386/contacts/C68894CF-D340-0001-78C3-1E301B4011F5.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"e51fdfd445d694a9b6c9528413ab524d\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/13386/contacts/87a44589-82ea-40c1-95d4-ec2d319e1d1d%2540webcloud7.zaclys.com.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"ec9678a5cbd77492caa20de7892a31ff\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/13386/contacts/urn%253Auuid%253A03a0e51f-d1aa-4385-8a53-e29025acd8af.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"bd84e6ff9b5322c89505dcdde02d7d28\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/13386/contacts/urn%253Auuid%253Ab8767877-b4a1-4c70-9acc-505d3819e519.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"c5c2711b3541087a61ee8199767f3122\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/13386/contacts/C69D888A-4320-0001-B5F4-D0EC62001453.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"15443cc80f469b3661744d4ab0883117\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/13386/contacts/C69DDEA8-86E0-0001-4367-815617061487.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"c0c8fa9e0e412392e21716a6c385a931\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/13386/contacts/323e09a1-b576-451b-88e3-a496e7b85bb8%2540webcloud7.zaclys.com.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"6d767c956d52429e859d4c201be13885\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/13386/contacts/949b58c2-2ec0-48ac-a0ab-5a5cc5c3dd73%2540webcloud7.zaclys.com.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"a5665907be7c0c6a58f609ea3ce606ac\""]}], status:["HTTP/1.1 200 OK"]}]}]
but then when I try to retrieve the list of contacts from account 11152 with this :
Code: Select all
let httpChannel = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Components.interfaces.nsIXMLHttpRequest);
httpChannel.open("PROPFIND", url2, true, 11152, password2);
all I get are contacts from account1 :
Code: Select all
[{href:["/remote.php/carddav/addressbooks/11152/contacts/"], propstat:[{prop:[{getcontenttype:[null], getetag:[null]}], status:["HTTP/1.1 404 Not Found"]}]}, {href:["/remote.php/carddav/addressbooks/11152/contacts/C68894CF-D340-0001-78C3-1E301B4011F5.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"e51fdfd445d694a9b6c9528413ab524d\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/11152/contacts/87a44589-82ea-40c1-95d4-ec2d319e1d1d%2540webcloud7.zaclys.com.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"ec9678a5cbd77492caa20de7892a31ff\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/11152/contacts/urn%253Auuid%253A03a0e51f-d1aa-4385-8a53-e29025acd8af.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"bd84e6ff9b5322c89505dcdde02d7d28\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/11152/contacts/urn%253Auuid%253Ab8767877-b4a1-4c70-9acc-505d3819e519.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"c5c2711b3541087a61ee8199767f3122\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/11152/contacts/C69D888A-4320-0001-B5F4-D0EC62001453.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"15443cc80f469b3661744d4ab0883117\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/11152/contacts/C69DDEA8-86E0-0001-4367-815617061487.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"c0c8fa9e0e412392e21716a6c385a931\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/11152/contacts/323e09a1-b576-451b-88e3-a496e7b85bb8%2540webcloud7.zaclys.com.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"6d767c956d52429e859d4c201be13885\""]}], status:["HTTP/1.1 200 OK"]}]}, {href:["/remote.php/carddav/addressbooks/11152/contacts/949b58c2-2ec0-48ac-a0ab-5a5cc5c3dd73%2540webcloud7.zaclys.com.vcf"], propstat:[{prop:[{getcontenttype:["text/x-vcard"], getetag:["\"a5665907be7c0c6a58f609ea3ce606ac\""]}], status:["HTTP/1.1 200 OK"]}]}]
I've tried to add this before without success :
Code: Select all
let httpAuthManager = Components.classes["@mozilla.org/network/http-auth-manager;1"].getService(Components.interfaces.nsIHttpAuthManager);
httpAuthManager.clearAll();
this problem seems a duplicate of this fixed bug : https://bugzilla.mozilla.org/show_bug.cgi?id=654348
anyone has an indea ?