Example #1
0
        private void ParseResponseHeaders(string rawHeaders)
        {
            var lines = Regex.Split(rawHeaders, Constants.CRLF);

            SetResponseStatus(lines[0]);

            for (var i = 1; i < lines.Length; i++)
            {
                var headerValuePair = Regex.Split(lines[i], ": ");

                if (CheckAndSetCookie(headerValuePair))
                {
                    continue;
                }
                Headers.AddOrUpdate(headerValuePair[0], headerValuePair[1]);
            }
        }
Example #2
0
 internal void AddHeader(string name, string value)
 {
     Headers.AddOrUpdate(name, value, (n, v) => value);
 }