mirror of
https://github.com/opensim/opensim.git
synced 2026-05-14 18:55:39 +08:00
add some broken assets check/log, so i don't try to fix other code using one
This commit is contained in:
@@ -114,7 +114,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||
return;
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(assetStr))
|
||||
if (string.IsNullOrEmpty(assetStr))
|
||||
return;
|
||||
|
||||
UUID assetID = UUID.Zero;
|
||||
@@ -122,13 +122,27 @@ namespace OpenSim.Capabilities.Handlers
|
||||
return;
|
||||
|
||||
AssetBase asset = m_assetService.Get(assetID.ToString(), serviceURL, false);
|
||||
if (asset == null || asset.Type != (sbyte)type)
|
||||
if (asset == null)
|
||||
{
|
||||
// m_log.Warn("[GETASSET]: not found: " + query + " " + assetStr);
|
||||
response.StatusCode = (int)HttpStatusCode.NotFound;
|
||||
return;
|
||||
}
|
||||
|
||||
if (asset.Type != (sbyte)type)
|
||||
{
|
||||
m_log.Warn("[GETASSET]: asset with wrong type: " + assetStr + " " + asset.Type.ToString() + " != " + ((sbyte)type).ToString());
|
||||
response.StatusCode = (int)HttpStatusCode.NotFound;
|
||||
return;
|
||||
}
|
||||
|
||||
if (asset.Data.Length == 0)
|
||||
{
|
||||
m_log.Warn("[GETASSET]: asset with empty data: " + assetStr +" type " + asset.Type.ToString());
|
||||
response.StatusCode = (int)HttpStatusCode.NotFound;
|
||||
return;
|
||||
}
|
||||
|
||||
int len = asset.Data.Length;
|
||||
|
||||
string range = null;
|
||||
|
||||
Reference in New Issue
Block a user