quick fix errorwhen parsing invalid http header
This commit is contained in:
parent
69a11814ac
commit
568b0a48fe
@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DiIiS_NA.Core.Logging;
|
||||
|
||||
namespace DiIiS_NA.REST.Http
|
||||
{
|
||||
@ -86,6 +87,8 @@ namespace DiIiS_NA.REST.Http
|
||||
headerValues.Add("type", info[2]);
|
||||
|
||||
while (!sr.EndOfStream)
|
||||
{
|
||||
try
|
||||
{
|
||||
info = sr.ReadLine().Split(new string[] { ": " }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
@ -110,6 +113,11 @@ namespace DiIiS_NA.REST.Http
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var httpFields = typeof(HttpHeader).GetTypeInfo().GetProperties();
|
||||
|
||||
Loading…
Reference in New Issue
user.block.title