remove stringent content type checking to make it easier to load oars directly from urls
parent
1f71523a5a
commit
32ef1b9e23
|
@ -454,6 +454,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resolve path to a working FileStream
|
/// Resolve path to a working FileStream
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="path"></param>
|
||||||
|
/// <returns></returns>
|
||||||
private Stream GetStream(string path)
|
private Stream GetStream(string path)
|
||||||
{
|
{
|
||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
|
@ -500,8 +502,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
WebResponse response = request.GetResponse();
|
WebResponse response = request.GetResponse();
|
||||||
Stream file = response.GetResponseStream();
|
Stream file = response.GetResponseStream();
|
||||||
|
|
||||||
if (response.ContentType != "application/x-oar")
|
// justincc: gonna ignore the content type for now and just try anything
|
||||||
throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString()));
|
//if (response.ContentType != "application/x-oar")
|
||||||
|
// throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString()));
|
||||||
|
|
||||||
if (response.ContentLength == 0)
|
if (response.ContentLength == 0)
|
||||||
throw new Exception(String.Format("{0} returned an empty file", uri.ToString()));
|
throw new Exception(String.Format("{0} returned an empty file", uri.ToString()));
|
||||||
|
|
Loading…
Reference in New Issue