public Session() { Response = new Response(); Request = new Request(); host = ""; Flags = new Dictionary<string, string>(); this.containsCodePoint = false; }
public object Clone() { Request r = new Request(); r.path = new string(this.path.ToCharArray()); r.HttpMethod = this.HttpMethod; r.bodyBytes = new byte[this.bodyBytes.Length]; for (int i = 0; i < this.bodyBytes.Length; i++) { r.bodyBytes[i] = this.bodyBytes[i]; } foreach (string key in this.headers.Keys) { List<string> values = this.headers[key]; foreach (string v in values) { r.headers.Add(new string(key.ToCharArray()), new string(v.ToCharArray())); } } return r; }