mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
Copy some more properties of the XmlRpcProxy to the JsonRpcClient and ensure all
JsonRpcCient properties are replicated when the session is duplicated. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
ac7eb1a8e2
commit
a86edc6cfd
@ -83,7 +83,16 @@ namespace XenAPI
|
||||
JsonRpcClient = new JsonRpcClient(session.Url)
|
||||
{
|
||||
JsonRpcVersion = session.JsonRpcClient.JsonRpcVersion,
|
||||
Timeout = timeout
|
||||
Timeout = timeout,
|
||||
ConnectionGroupName = session.JsonRpcClient.ConnectionGroupName,
|
||||
KeepAlive = session.JsonRpcClient.KeepAlive,
|
||||
UserAgent = session.JsonRpcClient.UserAgent,
|
||||
WebProxy = session.JsonRpcClient.WebProxy,
|
||||
ProtocolVersion = session.JsonRpcClient.ProtocolVersion,
|
||||
Expect100Continue = session.JsonRpcClient.Expect100Continue,
|
||||
AllowAutoRedirect = session.JsonRpcClient.AllowAutoRedirect,
|
||||
PreAuthenticate = session.JsonRpcClient.PreAuthenticate,
|
||||
Cookies = session.JsonRpcClient.Cookies
|
||||
};
|
||||
JsonRpcClient.RequestEvent += LogJsonRequest;
|
||||
}
|
||||
|
@ -175,6 +175,11 @@ namespace XenAPI
|
||||
public IWebProxy WebProxy { get; set; }
|
||||
public int Timeout { get; set; }
|
||||
public string ConnectionGroupName { get; set; }
|
||||
public Version ProtocolVersion { get; set; }
|
||||
public bool Expect100Continue { get; set; }
|
||||
public bool AllowAutoRedirect { get; set; }
|
||||
public bool PreAuthenticate { get; set; }
|
||||
public CookieContainer Cookies { get; set; }
|
||||
|
||||
public string Url { get; private set; }
|
||||
|
||||
@ -197,6 +202,12 @@ namespace XenAPI
|
||||
webRequest.Method = "POST";
|
||||
webRequest.ContentType = "application/json";
|
||||
webRequest.Accept = "application/json";
|
||||
webRequest.ProtocolVersion = ProtocolVersion;
|
||||
webRequest.ServicePoint.Expect100Continue = Expect100Continue;
|
||||
webRequest.AllowAutoRedirect = AllowAutoRedirect;
|
||||
webRequest.PreAuthenticate = PreAuthenticate;
|
||||
webRequest.AllowWriteStreamBuffering = true;
|
||||
webRequest.CookieContainer = Cookies;
|
||||
webRequest.Timeout = Timeout;
|
||||
webRequest.Proxy = WebProxy;
|
||||
webRequest.KeepAlive = KeepAlive;
|
||||
|
@ -417,7 +417,12 @@ namespace XenAPI
|
||||
Timeout = session.proxy.Timeout,
|
||||
KeepAlive = session.proxy.KeepAlive,
|
||||
UserAgent = session.proxy.UserAgent,
|
||||
WebProxy = session.proxy.Proxy
|
||||
WebProxy = session.proxy.Proxy,
|
||||
ProtocolVersion = session.proxy.ProtocolVersion,
|
||||
Expect100Continue = session.proxy.Expect100Continue,
|
||||
AllowAutoRedirect = session.proxy.AllowAutoRedirect,
|
||||
PreAuthenticate = session.proxy.PreAuthenticate,
|
||||
Cookies = session.proxy.CookieContainer
|
||||
};
|
||||
|
||||
if (isInvernessOrAbove)
|
||||
|
Loading…
Reference in New Issue
Block a user