Browse Source

Refine header parse

tags/3.4.0
noisyfox 7 years ago
parent
commit
f9e39fdd1d
1 changed files with 5 additions and 7 deletions
  1. +5
    -7
      shadowsocks-csharp/Controller/Service/Http2Socks5.cs

+ 5
- 7
shadowsocks-csharp/Controller/Service/Http2Socks5.cs View File

@@ -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)
{


Loading…
Cancel
Save