Exemplo n.º 1
0
        private Request(string method, Uri url)
        {
            _url = url;
            _method = method;

            var parsed = HttpUtility.ParseQueryString(url.Query);
            _query = new Dictionary<string, string[]>(parsed.Count);
            foreach (string key in parsed.Keys) {
                _query[key] = parsed.GetValues(key);
            }
            _pathBase = "/";
            _absolutePath = url.AbsolutePath;
            _relativePath = _pathBase.GetAppRelativePath(_absolutePath, true);
            _headers["Host"] = new string[] { url.Host };
            _isSecure = url.Scheme == "https";
        }