Fixed XML encoding bug thanks to MW
parent
297cef3e18
commit
d06367b68d
|
@ -98,7 +98,7 @@ namespace OpenGridServices
|
|||
SimInfoData["sendkey"]=TheSim.sendkey;
|
||||
SimInfoData["recvkey"]=TheSim.recvkey;
|
||||
SimInfoResp.Value=SimInfoData;
|
||||
return(XmlRpcResponseSerializer.Singleton.Serialize(SimInfoResp));
|
||||
return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(SimInfoResp),"utf-16","utf-8"));
|
||||
} else {
|
||||
XmlRpcResponse SimErrorResp = new XmlRpcResponse();
|
||||
Hashtable SimErrorData = new Hashtable();
|
||||
|
@ -129,7 +129,7 @@ namespace OpenGridServices
|
|||
response.SendChunked=false;
|
||||
|
||||
System.IO.Stream body = request.InputStream;
|
||||
System.Text.Encoding encoding = request.ContentEncoding;
|
||||
System.Text.Encoding encoding = System.Text.Encoding.UTF8;
|
||||
System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding);
|
||||
|
||||
string requestBody = reader.ReadToEnd();
|
||||
|
@ -152,11 +152,9 @@ namespace OpenGridServices
|
|||
}
|
||||
|
||||
|
||||
byte[] buffer = System.Text.Encoding.Unicode.GetBytes(responseString);
|
||||
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
|
||||
System.IO.Stream output = response.OutputStream;
|
||||
response.SendChunked=false;
|
||||
encoding = System.Text.Encoding.Unicode;
|
||||
response.ContentEncoding = encoding;
|
||||
response.ContentLength64=buffer.Length;
|
||||
output.Write(buffer,0,buffer.Length);
|
||||
output.Close();
|
||||
|
|
|
@ -128,8 +128,8 @@ namespace OpenGridServices
|
|||
LoginFlags["ever_logged_in"]="Y";
|
||||
|
||||
LoginGoodData["message"]=OpenUser_Main.userserver.DefaultStartupMsg;
|
||||
LoginGoodData["session_id"]=TheUser.CurrentSessionID;
|
||||
LoginGoodData["secure_sessionid"]=TheUser.CurrentSecureSessionID;
|
||||
LoginGoodData["session_id"]=TheUser.CurrentSessionID.ToString();
|
||||
LoginGoodData["secure_sessionid"]=TheUser.CurrentSecureSessionID.ToString();
|
||||
LoginGoodData["agent_access"]="M";
|
||||
LoginGoodData["start_location"]=requestData["start"];
|
||||
LoginGoodData["global_textures"]=GlobalTextures;
|
||||
|
@ -168,7 +168,7 @@ namespace OpenGridServices
|
|||
response.SendChunked=false;
|
||||
|
||||
System.IO.Stream body = request.InputStream;
|
||||
System.Text.Encoding encoding = request.ContentEncoding;
|
||||
System.Text.Encoding encoding = System.Text.Encoding.UTF8;
|
||||
System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding);
|
||||
|
||||
string requestBody = reader.ReadToEnd();
|
||||
|
@ -191,11 +191,9 @@ namespace OpenGridServices
|
|||
}
|
||||
|
||||
|
||||
byte[] buffer = System.Text.Encoding.Unicode.GetBytes(responseString);
|
||||
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
|
||||
System.IO.Stream output = response.OutputStream;
|
||||
response.SendChunked=false;
|
||||
encoding = System.Text.Encoding.UTF8;
|
||||
response.ContentEncoding = encoding;
|
||||
response.ContentLength64=buffer.Length;
|
||||
output.Write(buffer,0,buffer.Length);
|
||||
output.Close();
|
||||
|
|
|
@ -167,7 +167,7 @@ namespace OpenGridServices
|
|||
GridReqParams["authkey"]=SendKey;
|
||||
ArrayList SendParams = new ArrayList();
|
||||
SendParams.Add(GridReqParams);
|
||||
XmlRpcRequest GridReq = new XmlRpcRequest("get_sim_info",GridReqParams);
|
||||
XmlRpcRequest GridReq = new XmlRpcRequest("get_sim_info",SendParams);
|
||||
|
||||
XmlRpcResponse GridResp = GridReq.Send(GridURL,3000);
|
||||
|
||||
|
|
Loading…
Reference in New Issue