From eec3921800e3a19f210c0488d78399c210f9b9d6 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 8 Jan 2018 12:00:21 +0000 Subject: fall back to a obsolete property since several monos in use (include our own) do not suporte the proper .net4.0 one --- OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 2 +- OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs | 2 +- OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 63ebf86..78abaed 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -1130,7 +1130,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable()); XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context); - xtr.DtdProcessing = DtdProcessing.Prohibit; + xtr.ProhibitDtd = true; xtr.XmlResolver = null; // Loaded metadata will be empty if no information exists in the archive diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs index 92c935b..9a19ad9 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs @@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver StringReader sr = new StringReader(xml); XmlTextReader reader = new XmlTextReader(sr); - reader.DtdProcessing = DtdProcessing.Prohibit; + reader.ProhibitDtd = true; reader.XmlResolver = null; reader.ReadStartElement("assets"); diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs index c9e3141..8ac4de1 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs @@ -720,6 +720,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests string xml = SceneObjectSerializer.ToOriginalXmlFormat(so); XmlTextReader xtr = new XmlTextReader(new StringReader(xml)); + xtr.ProhibitDtd = true; + xtr.XmlResolver = null; xtr.ReadStartElement("SceneObjectGroup"); xtr.ReadStartElement("RootPart"); xtr.ReadStartElement("SceneObjectPart"); @@ -831,6 +833,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests string xml2 = m_serialiserModule.SerializeGroupToXml2(so, options); XmlTextReader xtr = new XmlTextReader(new StringReader(xml2)); + xtr.ProhibitDtd = true; + xtr.XmlResolver = null; xtr.ReadStartElement("SceneObjectGroup"); xtr.ReadStartElement("SceneObjectPart"); -- cgit v1.1 From e908c0ecadb9d44102ee649c5f9184e6e3034541 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 9 Jan 2018 19:47:10 +0000 Subject: give up on a property that old monos do compile, but then smore ok exec --- OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 1 - OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs | 1 - OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 78abaed..41515c0 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -1131,7 +1131,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context); xtr.ProhibitDtd = true; - xtr.XmlResolver = null; // Loaded metadata will be empty if no information exists in the archive dearchivedScenes.LoadedCreationDateTime = 0; diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs index 9a19ad9..5d3be62 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs @@ -94,7 +94,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver StringReader sr = new StringReader(xml); XmlTextReader reader = new XmlTextReader(sr); reader.ProhibitDtd = true; - reader.XmlResolver = null; reader.ReadStartElement("assets"); reader.Read(); diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs index 8ac4de1..23475a1 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs @@ -721,7 +721,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests XmlTextReader xtr = new XmlTextReader(new StringReader(xml)); xtr.ProhibitDtd = true; - xtr.XmlResolver = null; + xtr.ReadStartElement("SceneObjectGroup"); xtr.ReadStartElement("RootPart"); xtr.ReadStartElement("SceneObjectPart"); @@ -834,7 +834,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests XmlTextReader xtr = new XmlTextReader(new StringReader(xml2)); xtr.ProhibitDtd = true; - xtr.XmlResolver = null; + xtr.ReadStartElement("SceneObjectGroup"); xtr.ReadStartElement("SceneObjectPart"); -- cgit v1.1