Protect World Map module, RequestMapItemsAsync, from badly formed URLs.

viewer-2-initial-appearance
Diva Canto 2011-01-17 11:45:13 -08:00
parent 479d72ac97
commit 5e35651efc
1 changed files with 11 additions and 1 deletions

View File

@ -641,7 +641,17 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
lock (m_openRequests) lock (m_openRequests)
m_openRequests.Add(requestID, mrs); m_openRequests.Add(requestID, mrs);
WebRequest mapitemsrequest = WebRequest.Create(httpserver); WebRequest mapitemsrequest = null;
try
{
mapitemsrequest = WebRequest.Create(httpserver);
}
catch (Exception e)
{
m_log.DebugFormat("[WORLD MAP]: Access to {0} failed with {1}", httpserver, e);
return new OSDMap();
}
mapitemsrequest.Method = "POST"; mapitemsrequest.Method = "POST";
mapitemsrequest.ContentType = "application/xml+llsd"; mapitemsrequest.ContentType = "application/xml+llsd";
OSDMap RAMap = new OSDMap(); OSDMap RAMap = new OSDMap();