/// <summary> /// Completes the parsing of the request. /// </summary> public void EndParse() { string host; int pos; if (parseState != ParseState.GotAll) { throw new InvalidOperationException(BadParseMsg); } content = contentParser.EndParse(); contentParser = null; parseState = ParseState.Done; // Build up the request URI. host = base["Host"]; if (host == null) { host = "localhost"; } pos = host.IndexOf(':'); // Strip off the port if present if (pos != -1) { host = host.Substring(0, pos); } uri = new Uri(new Uri(string.Format("http://{0}:{1}", host, parsePort)), base.RawUri); }
/// <summary> /// Completes the parsing of the response. /// </summary> public void EndParse() { if (parseState != ParseState.GotAll) { throw new InvalidOperationException(BadParseMsg); } content = contentParser.EndParse(); contentParser = null; parseState = ParseState.Done; }