From ffc3dabc0a90063b0f5beba6416a91ec1215bad0 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 27 Nov 2009 15:10:12 +0000 Subject: [PATCH] remove stringent content type checking to make it easier to load oars directly from urls --- .../CoreModules/World/Archiver/ArchiveReadRequest.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 34b81d809a..af72968243 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -454,6 +454,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// /// Resolve path to a working FileStream /// + /// + /// private Stream GetStream(string path) { if (File.Exists(path)) @@ -500,8 +502,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver WebResponse response = request.GetResponse(); Stream file = response.GetResponseStream(); - if (response.ContentType != "application/x-oar") - throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString())); + // justincc: gonna ignore the content type for now and just try anything + //if (response.ContentType != "application/x-oar") + // throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString())); if (response.ContentLength == 0) throw new Exception(String.Format("{0} returned an empty file", uri.ToString()));