diff --git a/gridserver/src/GridHttp.cs b/gridserver/src/GridHttp.cs index 510f490fec..833a8ac8e8 100644 --- a/gridserver/src/GridHttp.cs +++ b/gridserver/src/GridHttp.cs @@ -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(); diff --git a/userserver/src/UserHttp.cs b/userserver/src/UserHttp.cs index eff63c9989..366854013d 100644 --- a/userserver/src/UserHttp.cs +++ b/userserver/src/UserHttp.cs @@ -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(); diff --git a/userserver/src/UserProfiles.cs b/userserver/src/UserProfiles.cs index 46d4add581..16ab11e9bd 100644 --- a/userserver/src/UserProfiles.cs +++ b/userserver/src/UserProfiles.cs @@ -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);