From 5e973adb77ec48b73c9a808fc922c442d4f0cb1c Mon Sep 17 00:00:00 2001 From: noisyfox Date: Fri, 16 Dec 2016 12:19:18 +1100 Subject: [PATCH] Revert "Refine header parse" This reverts commit f9e39fdd1d2cb85f3d170edfcb1ab0a1c77e2aae. --- shadowsocks-csharp/Controller/Service/Http2Socks5.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/shadowsocks-csharp/Controller/Service/Http2Socks5.cs b/shadowsocks-csharp/Controller/Service/Http2Socks5.cs index 094ab104..46d68b73 100644 --- a/shadowsocks-csharp/Controller/Service/Http2Socks5.cs +++ b/shadowsocks-csharp/Controller/Service/Http2Socks5.cs @@ -387,11 +387,6 @@ namespace Shadowsocks.Controller.Service Logging.Debug(line); - if (!line.StartsWith("Proxy-")) - { - _headers.Enqueue(line); - } - if (_requestLineCount == 0) { var m = HttpRequestHeaderRegex.Match(line); @@ -418,14 +413,21 @@ 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) {