HTTPRequest: withCredentials in XMLHttpRequest and manageCookies in AIR's URLLoader are not the same

HTML5 doesn't have the ability to disable cookies, as far as I can tell, but we can disable them on native targets.
This commit is contained in:
Josh Tynjala
2022-03-18 15:14:46 -07:00
parent ac88927b1a
commit dbecf2276c
2 changed files with 4 additions and 1 deletions

View File

@@ -236,7 +236,7 @@ class NativeHTTPRequest
curl.setOption(HEADERFUNCTION, curl_onHeader);
}
if (parent.withCredentials)
if (parent.manageCookies)
{
// an empty string means store cookies in memory
// cookies are stored only for the current session

View File

@@ -41,6 +41,7 @@ public var timeout:Int;
public var uri:String;
public var userAgent:String;
public var withCredentials:Bool;
public var manageCookies:Bool;
#if !doc_gen
@:noCompletion private var __backend:HTTPRequestBackend;
#end
@@ -57,6 +58,7 @@ public function new(uri:String = null)
method = GET;
timeout = #if lime_default_timeout Std.parseInt(Compiler.getDefine("lime-default-timeout")) #else 30000 #end;
withCredentials = false;
manageCookies = true;
#if !doc_gen
__backend = new HTTPRequestBackend();
@@ -166,6 +168,7 @@ public function load(uri:String = null):Future<T>
public var uri:String;
public var userAgent:String;
public var withCredentials:Bool;
public var manageCookies:Bool;
public function cancel():Void;
}