Example #1
0
        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);
        }
Example #2
0
 public SocketStream(Socket sock, MyHttpRequest req, MyHttpResponse resp)
     : base(sock)
 {
     request  = req;
     response = resp;
 }