public static string GetLocalPath(this MyHttpRequest req, string basePath) { if (req == null) { return(null); } var url = req.Url; var relativeUrl = url.AbsolutePath; var localPath = string.Format("{0}{1}", basePath, relativeUrl.Substring(1, relativeUrl.Length - 1).Replace('/', '\\')); return(localPath); }
public SocketStream(Socket sock, MyHttpRequest req, MyHttpResponse resp) : base(sock) { request = req; response = resp; }