make some use of those

master
UbitUmarov 2020-04-29 12:34:48 +01:00
parent c39ffa4dd1
commit b069b668e4
2 changed files with 20 additions and 20 deletions

View File

@ -424,7 +424,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
string result = LLSDHelpers.SerialiseLLSDReply(m_HostCapsObj.GetCapsDetails(true, validCaps));
httpResponse.RawBuffer = Encoding.UTF8.GetBytes(result);
httpResponse.RawBuffer = Util.UTF8NBGetbytes(result);
httpResponse.StatusCode = (int)HttpStatusCode.OK;
//m_log.DebugFormat("[CAPS] CapsRequest {0}", result);
}
@ -1266,7 +1266,7 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDxmlEncode.AddElem("type", folder.Type, sb);
LLSDxmlEncode.AddEndMap(sb);
httpResponse.RawBuffer = Encoding.UTF8.GetBytes(LLSDxmlEncode.End(sb));
httpResponse.RawBuffer = LLSDxmlEncode.EndToNBBytes(sb);
httpResponse.StatusCode = (int)HttpStatusCode.OK;
return;
}
@ -1514,7 +1514,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
httpResponse.RawBuffer = Encoding.UTF8.GetBytes(LLSDxmlEncode.End(lsl));
httpResponse.RawBuffer = LLSDxmlEncode.EndToNBBytes(lsl);
httpResponse.StatusCode = (int)HttpStatusCode.OK;
}
@ -1581,7 +1581,7 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDxmlEncode.AddEndMap(lsl);
}
httpResponse.RawBuffer = Encoding.UTF8.GetBytes(LLSDxmlEncode.End(lsl));
httpResponse.RawBuffer = LLSDxmlEncode.EndToNBBytes(lsl);
httpResponse.StatusCode = (int)HttpStatusCode.OK;
}
@ -1649,7 +1649,7 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDxmlEncode.AddEndMap(lsl);
// resp["transaction_id"] = "undef";
httpResponse.RawBuffer = Encoding.UTF8.GetBytes(LLSDxmlEncode.End(lsl));
httpResponse.RawBuffer = LLSDxmlEncode.EndToNBBytes(lsl);
httpResponse.StatusCode = (int)HttpStatusCode.OK;
}
@ -1825,7 +1825,7 @@ namespace OpenSim.Region.ClientStack.Linden
resp["HomeLocation"] = homeloc;
}
httpResponse.RawBuffer = Encoding.UTF8.GetBytes(OSDParser.SerializeLLSDXmlString(resp));
httpResponse.RawBuffer = Util.UTF8NBGetbytes(OSDParser.SerializeLLSDXmlString(resp));
httpResponse.StatusCode = (int)HttpStatusCode.OK;
}
@ -1964,7 +1964,7 @@ namespace OpenSim.Region.ClientStack.Linden
resp["members"] = new OSDMap();
}
httpResponse.RawBuffer = Encoding.UTF8.GetBytes(OSDParser.SerializeLLSDXmlString(resp));
httpResponse.RawBuffer = Util.UTF8NBGetbytes(OSDParser.SerializeLLSDXmlString(resp));
httpResponse.StatusCode = (int)HttpStatusCode.OK;
}
@ -2038,7 +2038,7 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDxmlEncode.AddEndMap(lsl);
httpResponse.RawBuffer = Encoding.UTF8.GetBytes(LLSDxmlEncode.End(lsl));
httpResponse.RawBuffer = LLSDxmlEncode.EndToNBBytes(lsl);
httpResponse.ContentType = "application/llsd+xml";
httpResponse.StatusCode = (int)HttpStatusCode.OK;
}

View File

@ -70,7 +70,7 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDAssetUploadError error = new LLSDAssetUploadError();
error.message = "failed to recode request";
error.identifier = UUID.Zero;
httpResponse.RawBuffer = Util.UTF8.GetBytes(LLSDHelpers.SerialiseLLSDReply(error));
httpResponse.RawBuffer = Util.UTF8NBGetbytes(LLSDHelpers.SerialiseLLSDReply(error));
return;
}
@ -82,7 +82,7 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDAssetUploadError error = new LLSDAssetUploadError();
error.message = "object not found";
error.identifier = UUID.Zero;
httpResponse.RawBuffer = Util.UTF8.GetBytes(LLSDHelpers.SerialiseLLSDReply(error));
httpResponse.RawBuffer = Util.UTF8NBGetbytes(LLSDHelpers.SerialiseLLSDReply(error));
return;
}
@ -91,7 +91,7 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDAssetUploadError error = new LLSDAssetUploadError();
error.message = "No permissions to edit objec";
error.identifier = UUID.Zero;
httpResponse.RawBuffer = Util.UTF8.GetBytes(LLSDHelpers.SerialiseLLSDReply(error));
httpResponse.RawBuffer = Util.UTF8NBGetbytes(LLSDHelpers.SerialiseLLSDReply(error));
return;
}
}
@ -118,7 +118,7 @@ namespace OpenSim.Region.ClientStack.Linden
// m_log.InfoFormat("[CAPS]: UpdateAgentInventoryAsset response: {0}",
// LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
httpResponse.RawBuffer = Util.UTF8.GetBytes(LLSDHelpers.SerialiseLLSDReply(uploadResponse));
httpResponse.RawBuffer = Util.UTF8NBGetbytes(LLSDHelpers.SerialiseLLSDReply(uploadResponse));
}
/// <summary>
@ -171,7 +171,7 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDAssetUploadError error = new LLSDAssetUploadError();
error.message = "failed to recode request";
error.identifier = UUID.Zero;
httpResponse.RawBuffer = Util.UTF8.GetBytes(LLSDHelpers.SerialiseLLSDReply(error));
httpResponse.RawBuffer = Util.UTF8NBGetbytes(LLSDHelpers.SerialiseLLSDReply(error));
return;
}
@ -181,7 +181,7 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDAssetUploadError error = new LLSDAssetUploadError();
error.message = "object not found";
error.identifier = UUID.Zero;
httpResponse.RawBuffer = Util.UTF8.GetBytes(LLSDHelpers.SerialiseLLSDReply(error));
httpResponse.RawBuffer = Util.UTF8NBGetbytes(LLSDHelpers.SerialiseLLSDReply(error));
return;
}
@ -190,7 +190,7 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDAssetUploadError error = new LLSDAssetUploadError();
error.message = "No permissions to edit objec";
error.identifier = UUID.Zero;
httpResponse.RawBuffer = Util.UTF8.GetBytes(LLSDHelpers.SerialiseLLSDReply(error));
httpResponse.RawBuffer = Util.UTF8NBGetbytes(LLSDHelpers.SerialiseLLSDReply(error));
return;
}
@ -199,7 +199,7 @@ namespace OpenSim.Region.ClientStack.Linden
LLSDAssetUploadError error = new LLSDAssetUploadError();
error.message = "No permissions to edit script";
error.identifier = UUID.Zero;
httpResponse.RawBuffer = Util.UTF8.GetBytes(LLSDHelpers.SerialiseLLSDReply(error));
httpResponse.RawBuffer = Util.UTF8NBGetbytes(LLSDHelpers.SerialiseLLSDReply(error));
return;
}
@ -225,7 +225,7 @@ namespace OpenSim.Region.ClientStack.Linden
// "ScriptTaskInventory response: {0}",
// LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
httpResponse.RawBuffer = Util.UTF8.GetBytes(LLSDHelpers.SerialiseLLSDReply(uploadResponse));
httpResponse.RawBuffer = Util.UTF8NBGetbytes(LLSDHelpers.SerialiseLLSDReply(uploadResponse));
}
catch (Exception e)
{
@ -353,7 +353,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
response.StatusCode = (int)HttpStatusCode.OK;
response.RawBuffer = Encoding.UTF8.GetBytes(res);
response.RawBuffer = Util.UTF8NBGetbytes(res);
}
}
@ -447,14 +447,14 @@ namespace OpenSim.Region.ClientStack.Linden
}
// m_log.InfoFormat("[CAPS]: TaskInventoryScriptUpdater.uploaderCaps res: {0}", res);
response.RawBuffer = Encoding.UTF8.GetBytes(res);
response.RawBuffer = Util.UTF8NBGetbytes(res);
}
catch
{
LLSDAssetUploadError error = new LLSDAssetUploadError();
error.message = "could not compile script";
error.identifier = UUID.Zero;
response.RawBuffer = Util.UTF8.GetBytes(LLSDHelpers.SerialiseLLSDReply(error));
response.RawBuffer = Util.UTF8NBGetbytes(LLSDHelpers.SerialiseLLSDReply(error));
return;
}
}