diff options
author | Justin Clark-Casey (justincc) | 2009-11-27 15:10:12 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-11-27 15:10:12 +0000 |
commit | 32ef1b9e239e027dbf5608fb25003a54d3b8eda0 (patch) | |
tree | 3e075beff5c50005ce34dcefd0296a0d247d0f27 | |
parent | minor: make irc bridge logging less verbose if it isn't actually enabled (diff) | |
download | opensim-SC_OLD-32ef1b9e239e027dbf5608fb25003a54d3b8eda0.zip opensim-SC_OLD-32ef1b9e239e027dbf5608fb25003a54d3b8eda0.tar.gz opensim-SC_OLD-32ef1b9e239e027dbf5608fb25003a54d3b8eda0.tar.bz2 opensim-SC_OLD-32ef1b9e239e027dbf5608fb25003a54d3b8eda0.tar.xz |
remove stringent content type checking to make it easier to load oars directly from urls
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 34b81d8..af72968 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 | |||
454 | /// <summary> | 454 | /// <summary> |
455 | /// Resolve path to a working FileStream | 455 | /// Resolve path to a working FileStream |
456 | /// </summary> | 456 | /// </summary> |
457 | /// <param name="path"></param> | ||
458 | /// <returns></returns> | ||
457 | private Stream GetStream(string path) | 459 | private Stream GetStream(string path) |
458 | { | 460 | { |
459 | if (File.Exists(path)) | 461 | if (File.Exists(path)) |
@@ -500,8 +502,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
500 | WebResponse response = request.GetResponse(); | 502 | WebResponse response = request.GetResponse(); |
501 | Stream file = response.GetResponseStream(); | 503 | Stream file = response.GetResponseStream(); |
502 | 504 | ||
503 | if (response.ContentType != "application/x-oar") | 505 | // justincc: gonna ignore the content type for now and just try anything |
504 | throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString())); | 506 | //if (response.ContentType != "application/x-oar") |
507 | // throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString())); | ||
505 | 508 | ||
506 | if (response.ContentLength == 0) | 509 | if (response.ContentLength == 0) |
507 | throw new Exception(String.Format("{0} returned an empty file", uri.ToString())); | 510 | throw new Exception(String.Format("{0} returned an empty file", uri.ToString())); |