mercredi 4 juin 2014

Why Firefox nsICookieService can't access cookies?


Vote count:

0




I have a code in my extension:



var ios = Components.classes["@http://ift.tt/1ltmMs3"].getService(Components.interfaces.nsIIOService);
var lURI = ios.newURI(this.URL, null, null);
var cookieSvc = Components.classes["@http://ift.tt/1i0BFkx"].getService(Components.interfaces.nsICookieService);
var cookie = cookieSvc.getCookieString(lURI , null);


In the developer profile I have a correct value in cookie, but in other profile cookie always null (even if it exists for domain), no matter what domain I set.


This is not a big problem for me, because I have found another solution: nsICookieManager2. But then I have got a new problem: in the developer profile XMLHTTPRequest has a correct cookies in headers, but in another profile XMLHTTPRequest has no cookies. I tried to set cookies manually and got a new problem: in developer profile cookies sent once, but in other twice! I stuck, and I don't understand what's happening.


The only difference between profiles in History section in Settings



asked 11 secs ago

rndm

106





Aucun commentaire:

Enregistrer un commentaire