Refine header parse

This commit is contained in:
noisyfox
2016-12-09 02:17:46 +11:00
parent 5ba0dffa5d
commit f9e39fdd1d
@@ -387,6 +387,11 @@ namespace Shadowsocks.Controller.Service
Logging.Debug(line);
if (!line.StartsWith("Proxy-"))
{
_headers.Enqueue(line);
}
if (_requestLineCount == 0)
{
var m = HttpRequestHeaderRegex.Match(line);
@@ -413,21 +418,14 @@ namespace Shadowsocks.Controller.Service
_targetPort = 80;
}
}
_headers.Enqueue(line);
}
}
else
{
if (line.IsNullOrEmpty())
{
_headers.Enqueue("");
return true;
}
if (!line.StartsWith("Proxy-"))
{
_headers.Enqueue(line);
}
if (!_isConnect)
{