public RequestHandler(HttpServer server, HttpRequestHead head) { string fName; string argLine; int pos = head.Path.IndexOf('?'); this.Head = head; this.Server = server; if (pos >= 0) { fName = head.Path.Substring(0, pos); argLine = head.Path.Substring(pos + 1); } else { fName = head.Path; argLine = ""; } Args = HttpParse.ParseArgumentLine(argLine); FileName = fName; FileInfo = new FileInfo(Path.Combine(server.WwwDir, fName.TrimStart('/'))); }