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:
@@ -236,7 +236,7 @@ class NativeHTTPRequest
|
|||||||
curl.setOption(HEADERFUNCTION, curl_onHeader);
|
curl.setOption(HEADERFUNCTION, curl_onHeader);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent.withCredentials)
|
if (parent.manageCookies)
|
||||||
{
|
{
|
||||||
// an empty string means store cookies in memory
|
// an empty string means store cookies in memory
|
||||||
// cookies are stored only for the current session
|
// cookies are stored only for the current session
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public var timeout:Int;
|
|||||||
public var uri:String;
|
public var uri:String;
|
||||||
public var userAgent:String;
|
public var userAgent:String;
|
||||||
public var withCredentials:Bool;
|
public var withCredentials:Bool;
|
||||||
|
public var manageCookies:Bool;
|
||||||
#if !doc_gen
|
#if !doc_gen
|
||||||
@:noCompletion private var __backend:HTTPRequestBackend;
|
@:noCompletion private var __backend:HTTPRequestBackend;
|
||||||
#end
|
#end
|
||||||
@@ -57,6 +58,7 @@ public function new(uri:String = null)
|
|||||||
method = GET;
|
method = GET;
|
||||||
timeout = #if lime_default_timeout Std.parseInt(Compiler.getDefine("lime-default-timeout")) #else 30000 #end;
|
timeout = #if lime_default_timeout Std.parseInt(Compiler.getDefine("lime-default-timeout")) #else 30000 #end;
|
||||||
withCredentials = false;
|
withCredentials = false;
|
||||||
|
manageCookies = true;
|
||||||
|
|
||||||
#if !doc_gen
|
#if !doc_gen
|
||||||
__backend = new HTTPRequestBackend();
|
__backend = new HTTPRequestBackend();
|
||||||
@@ -166,6 +168,7 @@ public function load(uri:String = null):Future<T>
|
|||||||
public var uri:String;
|
public var uri:String;
|
||||||
public var userAgent:String;
|
public var userAgent:String;
|
||||||
public var withCredentials:Bool;
|
public var withCredentials:Bool;
|
||||||
|
public var manageCookies:Bool;
|
||||||
public function cancel():Void;
|
public function cancel():Void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user