This might be a cookie isolation, or something missing to recognize if the cookie storage is allowed for the channel.  Is the `userContextId` the same all the time? If yes, can you capture a log with nsHttp:5,cookie:5?  Checking browser console for errors may tell you something too.

CC'ing Ehsan directly in case he spots something immediately from your code.  My own cookie-fu is not strong enough at the moment.

-hb-

On 2019-09-16 14:23, john.bieling--- via dev-platform wrote:
Hi,

I have run into something strange. This is how I create network connections in 
my (Thunderbird-) AddOn:

let channel = Services.io.newChannelFromURI(
     aConnection.uri,
     null,
     Services.scriptSecurityManager.createCodebasePrincipal(aConnection.uri, { 
userContextId }),
     null,
     Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
     Ci.nsIContentPolicy.TYPE_OTHER);

let httpchannel = channel.QueryInterface(Components.interfaces.nsIHttpChannel);
httpchannel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;

After updating from ESR60 to ESR68, that connection never uses cookies anymore. 
This is a fresh profile, so there are no specific cookie settings being set 
(network.cookie.cookieBehavior = 0).

I can see the request from the server to set cookies on each request, but on 
the next response, the cookies are not included.

This is used for standard HTTP requests (CardDAV in my case).

Can someone point me to what I am missing?

Thanks,
John
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to