diff --git a/Leaf.xNet.sln.DotSettings.user b/Leaf.xNet.sln.DotSettings.user index 1e95d93..90fdedb 100644 --- a/Leaf.xNet.sln.DotSettings.user +++ b/Leaf.xNet.sln.DotSettings.user @@ -1,4 +1,5 @@  + 2 True True True @@ -8,12 +9,12 @@ <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="Command" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="" Style="AaBb" /></Policy> + <Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="Keep" Suffix="" Style="AaBb" /></Policy> + + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="_" Suffix="" Style="aaBb" /></Policy> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> 2 AUTO \ No newline at end of file diff --git a/Leaf.xNet/~Http/HttpResponse.cs b/Leaf.xNet/~Http/HttpResponse.cs index 8e52615..fea4e75 100644 --- a/Leaf.xNet/~Http/HttpResponse.cs +++ b/Leaf.xNet/~Http/HttpResponse.cs @@ -897,16 +897,15 @@ private void ReceiveStartingLine() string statusCode = startingLine.Substring(" ", " "); // Если сервер не возвращает Reason Phrase - if (statusCode.Length == 0) + if (string.IsNullOrEmpty(statusCode)) statusCode = startingLine.Substring(" ", Http.NewLine); - if (version.Length == 0 || statusCode.Length == 0) + if (string.IsNullOrEmpty(version) || string.IsNullOrEmpty(statusCode)) throw NewHttpException(Resources.HttpException_ReceivedEmptyResponse); ProtocolVersion = Version.Parse(version); - StatusCode = (HttpStatusCode)Enum.Parse( - typeof(HttpStatusCode), statusCode); + StatusCode = (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), statusCode); } private void ReceiveHeaders()