remove stringent content type checking to make it easier to load oars directly from urls

0.6.8-post-fixes
Justin Clark-Casey (justincc) 2009-11-27 15:10:12 +00:00
parent c6889ab06b
commit ffc3dabc0a
1 changed files with 5 additions and 2 deletions

View File

@ -454,6 +454,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
/// <summary>
/// Resolve path to a working FileStream
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
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()));