avoid a null ref, plus some cleanup

This commit is contained in:
UbitUmarov
2020-05-07 02:02:50 +01:00
parent d5baeb4690
commit ac7187eada
5 changed files with 16 additions and 75 deletions

View File

@@ -177,10 +177,10 @@ namespace OpenSim.Framework.Servers.HttpServer
if(buffer == null)
{
if (!(contentType.Contains("image")
if (contentType != null && (!(contentType.Contains("image")
|| contentType.Contains("x-shockwave-flash")
|| contentType.Contains("application/x-oar")
|| contentType.Contains("application/vnd.ll.mesh")))
|| contentType.Contains("application/vnd.ll.mesh"))))
{
// Text
buffer = Encoding.UTF8.GetBytes(responseString);